Struct syn::Lifetime
[−]
[src]
pub struct Lifetime { pub apostrophe: Apostrophe, pub ident: Ident, }
A Rust lifetime: 'a
.
Lifetime names must conform to the following rules:
- Must start with an apostrophe.
- Must not consist of just an apostrophe:
'
. - Character after the apostrophe must be
_
or a Unicode code point with the XID_Start property. - All following characters must be Unicode code points with the XID_Continue property.
This type is available if Syn is built with the "derive"
or "full"
feature.
Fields
apostrophe: Apostrophe
ident: Ident
Methods
impl Lifetime
[src]
Trait Implementations
impl From<Lifetime> for TypeParamBound
[src]
fn from(e: Lifetime) -> TypeParamBound
[src]
Performs the conversion.
impl Synom for Lifetime
[src]
fn parse(input: Cursor) -> PResult<Self>
[src]
fn description() -> Option<&'static str>
[src]
A short name of the type being parsed. Read more
impl ToTokens for Lifetime
[src]
fn to_tokens(&self, tokens: &mut TokenStream)
[src]
Write self
to the given TokenStream
. Read more
fn into_token_stream(self) -> TokenStream
[src]
Convert self
directly into a TokenStream
object. Read more
impl Debug for Lifetime
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Clone for Lifetime
[src]
fn clone(&self) -> Lifetime
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Display for Lifetime
[src]
fn fmt(&self, formatter: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl PartialEq for Lifetime
[src]
fn eq(&self, other: &Lifetime) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl Eq for Lifetime
[src]
impl PartialOrd for Lifetime
[src]
fn partial_cmp(&self, other: &Lifetime) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for Lifetime
[src]
fn cmp(&self, other: &Lifetime) -> Ordering
[src]
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more