Enum syn::TraitItem [−][src]
pub enum TraitItem { Const(TraitItemConst), Method(TraitItemMethod), Type(TraitItemType), Macro(TraitItemMacro), Verbatim(TraitItemVerbatim), }
An item declaration within the definition of a trait.
This type is available if Syn is built with the "full"
feature.
Syntax tree enum
This type is a syntax tree enum.
Variants
Const(TraitItemConst)
An associated constant within the definition of a trait.
This type is available if Syn is built with the "full"
feature.
Method(TraitItemMethod)
A trait method within the definition of a trait.
This type is available if Syn is built with the "full"
feature.
Type(TraitItemType)
An associated type within the definition of a trait.
This type is available if Syn is built with the "full"
feature.
Macro(TraitItemMacro)
A macro invocation within the definition of a trait.
This type is available if Syn is built with the "full"
feature.
Verbatim(TraitItemVerbatim)
Tokens within the definition of a trait not interpreted by Syn.
This type is available if Syn is built with the "full"
feature.
Trait Implementations
impl Synom for TraitItem
[src]
impl Synom for TraitItem
fn parse(i: Cursor) -> PResult<Self>
[src]
fn parse(i: Cursor) -> PResult<Self>
fn description() -> Option<&'static str>
[src]
fn description() -> Option<&'static str>
A short name of the type being parsed. Read more
impl Debug for TraitItem
[src]
impl Debug for TraitItem
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Eq for TraitItem
[src]
impl Eq for TraitItem
impl PartialEq for TraitItem
[src]
impl PartialEq for TraitItem
fn eq(&self, other: &TraitItem) -> bool
[src]
fn eq(&self, other: &TraitItem) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &TraitItem) -> bool
[src]
fn ne(&self, other: &TraitItem) -> bool
This method tests for !=
.
impl Hash for TraitItem
[src]
impl Hash for TraitItem
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Clone for TraitItem
[src]
impl Clone for TraitItem
fn clone(&self) -> TraitItem
[src]
fn clone(&self) -> TraitItem
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl From<TraitItemConst> for TraitItem
[src]
impl From<TraitItemConst> for TraitItem
fn from(e: TraitItemConst) -> TraitItem
[src]
fn from(e: TraitItemConst) -> TraitItem
Performs the conversion.
impl From<TraitItemMethod> for TraitItem
[src]
impl From<TraitItemMethod> for TraitItem
fn from(e: TraitItemMethod) -> TraitItem
[src]
fn from(e: TraitItemMethod) -> TraitItem
Performs the conversion.
impl From<TraitItemType> for TraitItem
[src]
impl From<TraitItemType> for TraitItem
fn from(e: TraitItemType) -> TraitItem
[src]
fn from(e: TraitItemType) -> TraitItem
Performs the conversion.
impl From<TraitItemMacro> for TraitItem
[src]
impl From<TraitItemMacro> for TraitItem
fn from(e: TraitItemMacro) -> TraitItem
[src]
fn from(e: TraitItemMacro) -> TraitItem
Performs the conversion.
impl From<TraitItemVerbatim> for TraitItem
[src]
impl From<TraitItemVerbatim> for TraitItem
fn from(e: TraitItemVerbatim) -> TraitItem
[src]
fn from(e: TraitItemVerbatim) -> TraitItem
Performs the conversion.
impl ToTokens for TraitItem
[src]
impl ToTokens for TraitItem
fn to_tokens(&self, tokens: &mut TokenStream)
[src]
fn to_tokens(&self, tokens: &mut TokenStream)
Write self
to the given TokenStream
. Read more
fn into_token_stream(self) -> TokenStream
[src]
fn into_token_stream(self) -> TokenStream
Convert self
directly into a TokenStream
object. Read more