[][src]Struct intercom_common::type_parser::TypeInfo

pub struct TypeInfo<'s> {
    pub rust_type: RustType<'s>,
    pub pass_by: PassBy,
    pub is_mutable: bool,
    pub array_length: Option<&'s Expr>,
    pub original: &'s Type,
}

Details of a Rust type. Used for translation to other programming languages.

Fields

rust_type: RustType<'s>

The type in rust.

pass_by: PassBy

Specifies how the value is passed to/from a function. Default: PassBy::Value

is_mutable: bool

Is the Rust type defined as mutable? Default: false

array_length: Option<&'s Expr>

The length of the array if the Rust type denotes an array.

original: &'s Type

Reference to the original type that this type info represents.

Methods

impl<'s, 'p: 's> TypeInfo<'s>[src]

pub fn get_name(&self) -> String[src]

Gets the name of the type in Rust.

pub fn get_leaf(&self) -> &TypeInfo<'s>[src]

Returns the nested type info or self.

Trait Implementations

impl<'s> Clone for TypeInfo<'s>[src]

impl<'s> Debug for TypeInfo<'s>[src]

Auto Trait Implementations

impl<'s> !Send for TypeInfo<'s>

impl<'s> !Sync for TypeInfo<'s>

impl<'s> Unpin for TypeInfo<'s>

impl<'s> !UnwindSafe for TypeInfo<'s>

impl<'s> !RefUnwindSafe for TypeInfo<'s>

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]