Struct syn::TraitItemConst [−][src]
pub struct TraitItemConst { pub attrs: Vec<Attribute>, pub const_token: Const, pub ident: Ident, pub colon_token: Colon, pub ty: Type, pub default: Option<(Eq, Expr)>, pub semi_token: Semi, }
An associated constant within the definition of a trait.
This type is available if Syn is built with the "full"
feature.
Fields
attrs: Vec<Attribute>
const_token: Const
ident: Ident
colon_token: Colon
ty: Type
default: Option<(Eq, Expr)>
semi_token: Semi
Trait Implementations
impl Parse for TraitItemConst
[src]
impl Parse for TraitItemConst
fn parse(input: ParseStream) -> Result<Self>
[src]
fn parse(input: ParseStream) -> Result<Self>
impl ToTokens for TraitItemConst
[src]
impl ToTokens for TraitItemConst
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
impl Debug for TraitItemConst
[src]
impl Debug for TraitItemConst
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 TraitItemConst
[src]
impl Eq for TraitItemConst
impl PartialEq for TraitItemConst
[src]
impl PartialEq for TraitItemConst
fn eq(&self, other: &TraitItemConst) -> bool
[src]
fn eq(&self, other: &TraitItemConst) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &TraitItemConst) -> bool
[src]
fn ne(&self, other: &TraitItemConst) -> bool
This method tests for !=
.
impl Hash for TraitItemConst
[src]
impl Hash for TraitItemConst
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,
1.3.0
[src]Feeds a slice of this type into the given [Hasher
]. Read more
impl Clone for TraitItemConst
[src]
impl Clone for TraitItemConst
fn clone(&self) -> TraitItemConst
[src]
fn clone(&self) -> TraitItemConst
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)
1.0.0
[src]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.
Auto Trait Implementations
impl !Send for TraitItemConst
impl !Send for TraitItemConst
impl !Sync for TraitItemConst
impl !Sync for TraitItemConst