Struct syntax_ext::deriving::generic::TraitDef
[−]
[src]
pub struct TraitDef<'a> { pub span: Span, pub attributes: Vec<Attribute>, pub path: Path<'a>, pub additional_bounds: Vec<Ty<'a>>, pub generics: LifetimeBounds<'a>, pub is_unsafe: bool, pub supports_unions: bool, pub methods: Vec<MethodDef<'a>>, pub associated_types: Vec<(Ident, Ty<'a>)>, }
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Fields
span: Span
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
The span for the current #[derive(Foo)] header.
attributes: Vec<Attribute>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
path: Path<'a>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Path of the trait, including any type parameters
additional_bounds: Vec<Ty<'a>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Additional bounds required of any type parameters of the type, other than the current trait
generics: LifetimeBounds<'a>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Any extra lifetimes and/or bounds, e.g. D: serialize::Decoder
is_unsafe: bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Is it an unsafe
trait?
supports_unions: bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Can this trait be derived for unions?
methods: Vec<MethodDef<'a>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
associated_types: Vec<(Ident, Ty<'a>)>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Methods
impl<'a> TraitDef<'a>
[src]
impl<'a> TraitDef<'a>
pub fn expand(
self,
cx: &mut ExtCtxt,
mitem: &MetaItem,
item: &'a Annotatable,
push: &mut FnMut(Annotatable)
)
[src]
pub fn expand(
self,
cx: &mut ExtCtxt,
mitem: &MetaItem,
item: &'a Annotatable,
push: &mut FnMut(Annotatable)
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn expand_ext(
self,
cx: &mut ExtCtxt,
mitem: &MetaItem,
item: &'a Annotatable,
push: &mut FnMut(Annotatable),
from_scratch: bool
)
[src]
pub fn expand_ext(
self,
cx: &mut ExtCtxt,
mitem: &MetaItem,
item: &'a Annotatable,
push: &mut FnMut(Annotatable),
from_scratch: bool
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?