Struct syn::Lifetime
[−]
[src]
pub struct Lifetime { /* fields omitted */ }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.
Methods
impl Lifetime[src]
pub fn new(s: &str, span: Span) -> Self[src]
pub fn span(&self) -> Span[src]
pub fn set_span(&mut self, span: Span)[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 Tokens)[src]
Write self to the given Tokens. Read more
fn into_tokens(self) -> Tokens[src]
Convert self directly into a Tokens object. Read more
impl Copy for Lifetime[src]
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) -> bool1.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) -> bool1.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) -> bool1.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) -> bool1.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) -> bool1.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) -> Self1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self1.21.0[src]
Compares and returns the minimum of two values. Read more