pub struct Type<'a> { /* private fields */ }
Expand description
Representation of a type which may have a definition or may be built-in.
Implementations
sourceimpl<'a> Type<'a>
impl<'a> Type<'a>
sourcepub fn ident(&self) -> TokenStream
pub fn ident(&self) -> TokenStream
The identifier for the type as might be used for a function return or defining the type of a member of a struct..
sourcepub fn parameter_ident(&self) -> TokenStream
pub fn parameter_ident(&self) -> TokenStream
The identifier for the type as might be used for a parameter in a
function signature. In general: simple types are the same as
Type::ident and complex types prepend a &
.
sourcepub fn parameter_ident_with_lifetime(&self, lifetime: &str) -> TokenStream
pub fn parameter_ident_with_lifetime(&self, lifetime: &str) -> TokenStream
The identifier for the type as might be used for a parameter in a
function signature along with a lifetime parameter. In general: simple
types are the same as Type::ident and complex types prepend a
&'<lifetime>
.
sourcepub fn describe(&self) -> String
pub fn describe(&self) -> String
A textual description of the type appropriate for debug output.
sourcepub fn details(&self) -> TypeDetails<'_>
pub fn details(&self) -> TypeDetails<'_>
Get details about the type.
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for Type<'a>
impl<'a> Send for Type<'a>
impl<'a> Sync for Type<'a>
impl<'a> Unpin for Type<'a>
impl<'a> UnwindSafe for Type<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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