pub struct SnifedEntry {
pub snif_path: Path,
pub item: Item,
/* private fields */
}Expand description
Represents a single entry in snif! route.
Used to represent a single result of handled snif! macro.
Example:
#[derive(token_goblin::Snif)]
struct Foo {
x: i32,
}
token_goblin::snif!(Foo in stringify_our!()); // -> "Foo => { struct Foo { x : i32, } }" is one entryFields§
§snif_path: PathPath to macro that was used to generate this entry.
item: ItemItem that was snifed.
Implementations§
Trait Implementations§
Source§impl Clone for SnifedEntry
impl Clone for SnifedEntry
Source§fn clone(&self) -> SnifedEntry
fn clone(&self) -> SnifedEntry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Parse for SnifedEntry
impl Parse for SnifedEntry
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ToTokens for SnifedEntry
impl ToTokens for SnifedEntry
Source§fn to_tokens(&self, tokens: &mut TokenStream)
fn to_tokens(&self, tokens: &mut TokenStream)
Source§fn to_token_stream(&self) -> TokenStream
fn to_token_stream(&self) -> TokenStream
Source§fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
Auto Trait Implementations§
impl !Send for SnifedEntry
impl !Sync for SnifedEntry
impl Freeze for SnifedEntry
impl RefUnwindSafe for SnifedEntry
impl Unpin for SnifedEntry
impl UnsafeUnpin for SnifedEntry
impl UnwindSafe for SnifedEntry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Spanned for Twhere
T: Spanned + ?Sized,
impl<T> Spanned for Twhere
T: Spanned + ?Sized,
Source§fn 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.