[−][src]Struct syntax_ext::deriving::generic::TraitDef
🔬 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?
fn create_derived_impl(
&self,
cx: &mut ExtCtxt,
type_ident: Ident,
generics: &Generics,
field_tys: Vec<P<Ty>>,
methods: Vec<ImplItem>
) -> P<Item>
[src]
fn create_derived_impl(
&self,
cx: &mut ExtCtxt,
type_ident: Ident,
generics: &Generics,
field_tys: Vec<P<Ty>>,
methods: Vec<ImplItem>
) -> P<Item>
🔬 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?
Given that we are deriving a trait DerivedTrait
for a type like:
struct Struct<'a, ..., 'z, A, B: DeclaredTrait, C, ..., Z> where C: WhereTrait { a: A, b: B::Item, b1: <B as DeclaredTrait>::Item, c1: <C as WhereTrait>::Item, c2: Option<<C as WhereTrait>::Item>, ... }
create an impl like:
impl<'a, ..., 'z, A, B: DeclaredTrait, C, ... Z> where C: WhereTrait, A: DerivedTrait + B1 + ... + BN, B: DerivedTrait + B1 + ... + BN, C: DerivedTrait + B1 + ... + BN, B::Item: DerivedTrait + B1 + ... + BN, <C as WhereTrait>::Item: DerivedTrait + B1 + ... + BN, ... { ... }
where B1, ..., BN are the bounds given by bounds_paths
.'. Z is a phantom type, and
therefore does not get bound by the derived trait.
fn expand_struct_def(
&self,
cx: &mut ExtCtxt,
struct_def: &'a VariantData,
type_ident: Ident,
generics: &Generics,
from_scratch: bool,
use_temporaries: bool
) -> P<Item>
[src]
fn expand_struct_def(
&self,
cx: &mut ExtCtxt,
struct_def: &'a VariantData,
type_ident: Ident,
generics: &Generics,
from_scratch: bool,
use_temporaries: bool
) -> P<Item>
🔬 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?
fn expand_enum_def(
&self,
cx: &mut ExtCtxt,
enum_def: &'a EnumDef,
type_attrs: &[Attribute],
type_ident: Ident,
generics: &Generics,
from_scratch: bool
) -> P<Item>
[src]
fn expand_enum_def(
&self,
cx: &mut ExtCtxt,
enum_def: &'a EnumDef,
type_attrs: &[Attribute],
type_ident: Ident,
generics: &Generics,
from_scratch: bool
) -> P<Item>
🔬 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?
impl<'a> TraitDef<'a>
[src]
impl<'a> TraitDef<'a>
fn summarise_struct(
&self,
cx: &mut ExtCtxt,
struct_def: &VariantData
) -> StaticFields
[src]
fn summarise_struct(
&self,
cx: &mut ExtCtxt,
struct_def: &VariantData
) -> StaticFields
🔬 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?
fn create_subpatterns(
&self,
cx: &mut ExtCtxt,
field_paths: Vec<Ident>,
mutbl: Mutability,
use_temporaries: bool
) -> Vec<P<Pat>>
[src]
fn create_subpatterns(
&self,
cx: &mut ExtCtxt,
field_paths: Vec<Ident>,
mutbl: Mutability,
use_temporaries: bool
) -> Vec<P<Pat>>
🔬 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?
fn create_struct_pattern(
&self,
cx: &mut ExtCtxt,
struct_path: Path,
struct_def: &'a VariantData,
prefix: &str,
mutbl: Mutability,
use_temporaries: bool
) -> (P<Pat>, Vec<(Span, Option<Ident>, P<Expr>, &'a [Attribute])>)
[src]
fn create_struct_pattern(
&self,
cx: &mut ExtCtxt,
struct_path: Path,
struct_def: &'a VariantData,
prefix: &str,
mutbl: Mutability,
use_temporaries: bool
) -> (P<Pat>, Vec<(Span, Option<Ident>, P<Expr>, &'a [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?
fn create_enum_variant_pattern(
&self,
cx: &mut ExtCtxt,
enum_ident: Ident,
variant: &'a Variant,
prefix: &str,
mutbl: Mutability
) -> (P<Pat>, Vec<(Span, Option<Ident>, P<Expr>, &'a [Attribute])>)
[src]
fn create_enum_variant_pattern(
&self,
cx: &mut ExtCtxt,
enum_ident: Ident,
variant: &'a Variant,
prefix: &str,
mutbl: Mutability
) -> (P<Pat>, Vec<(Span, Option<Ident>, P<Expr>, &'a [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?
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Gets the TypeId
of self
. Read more
impl<E> SpecializationError for E
[src]
impl<E> SpecializationError for E
fn not_found<S, T>(trait_name: &'static str, method_name: &'static str) -> E where
T: ?Sized,
[src]
fn not_found<S, T>(trait_name: &'static str, method_name: &'static str) -> E where
T: ?Sized,
🔬 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?
Create an error for a missing method specialization. Defaults to panicking with type, trait & method names. S
is the encoder/decoder state type, T
is the type being encoded/decoded, and the arguments are the names of the trait and method that should've been overridden. Read more
impl<T> Erased for T
[src]
impl<T> Erased for T
impl<T> Send for T where
T: ?Sized,
[src]
impl<T> Send for T where
T: ?Sized,
impl<T> Sync for T where
T: ?Sized,
[src]
impl<T> Sync for T where
T: ?Sized,
impl<T> Erased for T
impl<T> Erased for T