pub struct arg {
pub span: Span,
}
Fields
span: Span
Trait Implementations
sourceimpl ToTokens for arg
impl ToTokens for arg
sourcefn to_tokens(&self, tokens: &mut TokenStream2)
fn to_tokens(&self, tokens: &mut TokenStream2)
Write self
to the given TokenStream
. Read more
sourcefn to_token_stream(&self) -> TokenStream
fn to_token_stream(&self) -> TokenStream
Convert self
directly into a TokenStream
object. Read more
sourcefn into_token_stream(self) -> TokenStream
fn into_token_stream(self) -> TokenStream
Convert self
directly into a TokenStream
object. Read more
impl Copy for arg
impl Eq for arg
Auto Trait Implementations
impl RefUnwindSafe for arg
impl !Send for arg
impl !Sync for arg
impl Unpin for arg
impl UnwindSafe for arg
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> EasyArgument for T where
T: EasyToken,
impl<T> EasyArgument for T where
T: EasyToken,
sourceimpl<T> EasyArgumentField for T where
T: EasyArgumentGroup,
impl<T> EasyArgumentField for T where
T: EasyArgumentGroup,
sourcefn try_parse(
lookahead1: &Lookahead1<'_>,
stream: &ParseBuffer<'_>
) -> Result<Option<T>, Error>
fn try_parse(
lookahead1: &Lookahead1<'_>,
stream: &ParseBuffer<'_>
) -> Result<Option<T>, Error>
Attempt to parse attribute field.
Returns some field when parsing succeeds.
Returns none if attribute peeking returns false
, signalling that stream contains some other attribute.
Returns error if peeking returns true
but parsing fails. Read more
sourcefn try_extend(
&mut self,
lookahead1: &Lookahead1<'_>,
stream: &ParseBuffer<'_>
) -> Result<bool, Error>
fn try_extend(
&mut self,
lookahead1: &Lookahead1<'_>,
stream: &ParseBuffer<'_>
) -> Result<bool, Error>
Attempt to parse attribute field when it already has been successfully parsed.
Field value should extend itself with newly parsed attribute or return error.
Returns true when parsing and extending succeeds.
Returns false if attribute peeking returns false
, signalling that stream contains some other attribute.
Returns error if peeking returns true
but parsing or extending fails. Read more
sourceimpl<T> EasyArgumentGroup for T where
T: EasyArgument,
impl<T> EasyArgumentGroup for T where
T: EasyArgument,
sourcefn try_parse(
lookahead1: &Lookahead1<'_>,
stream: &ParseBuffer<'_>
) -> Result<Option<T>, Error>
fn try_parse(
lookahead1: &Lookahead1<'_>,
stream: &ParseBuffer<'_>
) -> Result<Option<T>, Error>
Attempt to parse attribute group.
Returns some attribute when parsing succeeds.
Returns none if attribute peeking returns false
, signalling that stream contains some other attribute.
Returns error if peeking returns true
but parsing fails. Read more
sourcefn overlap_error(&self, other: &T) -> Error
fn overlap_error(&self, other: &T) -> Error
Produces error with appropriate message when the attribute group overlaps another instance.
This is called by certain EasyArgumentField
implementations. Read more
sourcefn missing_error() -> String
fn missing_error() -> String
Produces error with appropriate message when the attribute group is missing.
This is called by certain EasyArgumentField
implementations. Read more
sourceimpl<T> EasyPeek for T where
T: Token + Parse,
impl<T> EasyPeek for T where
T: Token + Parse,
sourcefn peek(lookahead1: &Lookahead1<'_>) -> bool
fn peek(lookahead1: &Lookahead1<'_>) -> bool
Peek head token before parsing.
sourcefn peek_stream(stream: &ParseBuffer<'_>) -> bool
fn peek_stream(stream: &ParseBuffer<'_>) -> bool
Peek head token before parsing.
sourceimpl<T> Spanned for T where
T: Spanned + ?Sized,
impl<T> Spanned for T where
T: Spanned + ?Sized,
sourcefn span(&self) -> Span
fn span(&self) -> Span
Returns a Span
covering the complete contents of this syntax tree
node, or Span::call_site()
if this node is empty. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more