Skip to main content

TypeKind

Enum TypeKind 

Source
pub enum TypeKind {
    Array(TypeArray),
    Disambiguation(TypeDisambiguation),
    Function(TypeFunction),
    HigherRankedTraitBounds(TypeHigherRankedTraitBounds),
    DynTrait(TypeDynTrait),
    ImplTrait(TypeImplTrait),
    Named(TypeNamed),
    Pointer(TypePointer),
    Reference(TypeReference),
    Slice(TypeSlice),
    Tuple(TypeTuple),
    Uninhabited(Extent),
}

Variants§

§

Array(TypeArray)

§

Disambiguation(TypeDisambiguation)

§

Function(TypeFunction)

§

HigherRankedTraitBounds(TypeHigherRankedTraitBounds)

§

DynTrait(TypeDynTrait)

§

ImplTrait(TypeImplTrait)

§

Named(TypeNamed)

§

Pointer(TypePointer)

§

Reference(TypeReference)

§

Slice(TypeSlice)

§

Tuple(TypeTuple)

§

Uninhabited(Extent)

Implementations§

Source§

impl TypeKind

Source

pub fn into_array(self) -> Option<TypeArray>

Source

pub fn into_disambiguation(self) -> Option<TypeDisambiguation>

Source

pub fn into_function(self) -> Option<TypeFunction>

Source

pub fn into_higher_ranked_trait_bounds( self, ) -> Option<TypeHigherRankedTraitBounds>

Source

pub fn into_dyn_trait(self) -> Option<TypeDynTrait>

Source

pub fn into_impl_trait(self) -> Option<TypeImplTrait>

Source

pub fn into_named(self) -> Option<TypeNamed>

Source

pub fn into_pointer(self) -> Option<TypePointer>

Source

pub fn into_reference(self) -> Option<TypeReference>

Source

pub fn into_slice(self) -> Option<TypeSlice>

Source

pub fn into_tuple(self) -> Option<TypeTuple>

Source

pub fn into_uninhabited(self) -> Option<Extent>

Source

pub fn as_array(&self) -> Option<&TypeArray>

Source

pub fn as_disambiguation(&self) -> Option<&TypeDisambiguation>

Source

pub fn as_function(&self) -> Option<&TypeFunction>

Source

pub fn as_higher_ranked_trait_bounds( &self, ) -> Option<&TypeHigherRankedTraitBounds>

Source

pub fn as_dyn_trait(&self) -> Option<&TypeDynTrait>

Source

pub fn as_impl_trait(&self) -> Option<&TypeImplTrait>

Source

pub fn as_named(&self) -> Option<&TypeNamed>

Source

pub fn as_pointer(&self) -> Option<&TypePointer>

Source

pub fn as_reference(&self) -> Option<&TypeReference>

Source

pub fn as_slice(&self) -> Option<&TypeSlice>

Source

pub fn as_tuple(&self) -> Option<&TypeTuple>

Source

pub fn as_uninhabited(&self) -> Option<&Extent>

Source

pub fn is_array(&self) -> bool

Source

pub fn is_disambiguation(&self) -> bool

Source

pub fn is_function(&self) -> bool

Source

pub fn is_higher_ranked_trait_bounds(&self) -> bool

Source

pub fn is_dyn_trait(&self) -> bool

Source

pub fn is_impl_trait(&self) -> bool

Source

pub fn is_named(&self) -> bool

Source

pub fn is_pointer(&self) -> bool

Source

pub fn is_reference(&self) -> bool

Source

pub fn is_slice(&self) -> bool

Source

pub fn is_tuple(&self) -> bool

Source

pub fn is_uninhabited(&self) -> bool

Trait Implementations§

Source§

impl Debug for TypeKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl HasExtent for TypeKind

Source§

fn extent(&self) -> Extent

Source§

impl<'a> Index<&'a TypeKind> for str

Source§

type Output = str

The returned type after indexing.
Source§

fn index(&self, i: &'a TypeKind) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<TypeKind> for str

Source§

type Output = str

The returned type after indexing.
Source§

fn index(&self, i: TypeKind) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Visit for TypeKind

Source§

fn visit<'ast, V>(&'ast self, v: &mut V)
where V: Visitor<'ast>,

Source§

fn visit_mut<V>(&mut self, v: &mut V)
where V: VisitorMut,

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.