pub struct Map<'p> { /* private fields */ }
Implementations§
Source§impl<'p> Map<'p>
impl<'p> Map<'p>
pub fn new_sub_map(&self, suffix: &str) -> Map<'_>
pub fn telety_path(&self) -> Option<&Path>
pub fn map_path(&self) -> &Path
pub fn module(&self) -> &Module
pub fn visibility(&self) -> &Visibility
pub fn unique_ident(&self) -> &Ident
pub fn generics(&self) -> &Generics
Sourcepub fn insert(&mut self, ty: &TypePath) -> Result<bool, Error>
pub fn insert(&mut self, ty: &TypePath) -> Result<bool, Error>
Register a syn::TypePath in the Map. If the exact (i.e. identical tokens, not equivalent Rust types) type already exists in the map, this is a no-op. Maps constructed with the same parameters and order of inserts will yield the same Aliases.
pub fn get_self(&self) -> Option<Alias<'_>>
pub fn get_alias<'map>( &'map self, ty: &TypePath, ) -> Result<Option<Alias<'map>>, Error>
pub fn visitor(&self) -> ApplyAliases<'_>
pub fn with_module(&self) -> impl ToTokens + use<'_>
Trait Implementations§
Source§impl<'p> ToTokens for Map<'p>
impl<'p> ToTokens for Map<'p>
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<'p> Freeze for Map<'p>
impl<'p> RefUnwindSafe for Map<'p>
impl<'p> !Send for Map<'p>
impl<'p> !Sync for Map<'p>
impl<'p> Unpin for Map<'p>
impl<'p> UnwindSafe for Map<'p>
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> 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.