pub struct ItemImpl {
pub attrs: Vec<Attribute>,
pub defaultness: Option<Default>,
pub unsafety: Option<Unsafe>,
pub impl_token: Impl,
pub generics: Generics,
pub trait_: Option<(Option<Bang>, Path, For)>,
pub self_ty: Box<Type>,
pub brace_token: Brace,
pub items: Vec<ImplItem>,
}
Available on crate feature
full
only.Expand description
An impl block providing trait or associated items: impl<A> Trait for Data<A> { ... }
.
This type is available only if Syn is built with the "full"
feature.
Fields§
§attrs: Vec<Attribute>
§defaultness: Option<Default>
§unsafety: Option<Unsafe>
§impl_token: Impl
§generics: Generics
§trait_: Option<(Option<Bang>, Path, For)>
Trait this impl implements.
self_ty: Box<Type>
The Self type of the impl.
brace_token: Brace
§items: Vec<ImplItem>
Trait Implementations§
source§impl Parse for ItemImpl
Available on crate feature parsing
only.
impl Parse for ItemImpl
Available on crate feature
parsing
only.fn parse(input: ParseStream<'_>) -> Result<Self>
source§impl PartialEq<ItemImpl> for ItemImpl
Available on crate feature extra-traits
only.
impl PartialEq<ItemImpl> for ItemImpl
Available on crate feature
extra-traits
only.source§impl ToTokens for ItemImpl
Available on crate feature printing
only.
impl ToTokens for ItemImpl
Available on crate feature
printing
only.source§fn to_tokens(&self, tokens: &mut TokenStream)
fn to_tokens(&self, tokens: &mut TokenStream)
source§fn to_token_stream(&self) -> TokenStream
fn to_token_stream(&self) -> TokenStream
source§fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
impl Eq for ItemImpl
Available on crate feature
extra-traits
only.