pub struct TypePath { /* private fields */ }
Implementations§
Source§impl TypePath
impl TypePath
pub fn new<T>(path: T) -> Result<TypePath, Error>where
T: ToString,
pub fn relative_path_from(&self, path: &TypePath) -> TypePath
pub fn parent(&self) -> TypePath
pub fn take_parts(self) -> Vec<Ident>
pub fn has_multiple_parts(&self) -> bool
pub fn prepend(self, another: TypePath) -> TypePath
pub fn append(self, another: TypePath) -> TypePath
pub fn ident(&self) -> Option<&Ident>
Trait Implementations§
Source§impl Ord for TypePath
impl Ord for TypePath
Source§impl PartialOrd for TypePath
impl PartialOrd for TypePath
Source§impl ToTokens for TypePath
impl ToTokens for TypePath
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,
impl Eq for TypePath
impl StructuralPartialEq for TypePath
Auto Trait Implementations§
impl Freeze for TypePath
impl RefUnwindSafe for TypePath
impl !Send for TypePath
impl !Sync for TypePath
impl Unpin for TypePath
impl UnwindSafe for TypePath
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§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.