pub struct TypeInfo {
pub reference: Option<Ref>,
pub type_: Rc<RustType>,
/* private fields */
}Fields§
§reference: Option<Ref>§type_: Rc<RustType>Implementations§
Source§impl TypeInfo
impl TypeInfo
pub fn inner(&self) -> &Self
pub fn as_path(&self) -> Option<Path>
pub fn require_path(&self) -> Result<Path>
pub fn as_type(&self) -> Type
pub fn is_mut_ref(&self) -> bool
pub fn is_ref(&self) -> bool
pub fn is_owned(&self) -> bool
pub fn from_type(typ: &Type) -> Result<Self>
Sourcepub fn is_hash_map(&self) -> bool
pub fn is_hash_map(&self) -> bool
Returns true if the rust type is HashMap.
pub fn is_num(&self) -> bool
pub fn is_primitive(&self) -> bool
Trait Implementations§
Source§impl ToTokens for TypeInfo
impl ToTokens for TypeInfo
Source§fn to_tokens(&self, tokens: &mut TokenStream2)
fn to_tokens(&self, tokens: &mut TokenStream2)
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 TypeInfo
Auto Trait Implementations§
impl Freeze for TypeInfo
impl RefUnwindSafe for TypeInfo
impl !Send for TypeInfo
impl !Sync for TypeInfo
impl Unpin for TypeInfo
impl UnwindSafe for TypeInfo
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)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.