pub enum Type {
    Struct(Struct),
    Enum(Enum),
}

Variants§

§

Struct(Struct)

§

Enum(Enum)

Implementations§

source§

impl Type

source

pub fn is_struct(&self) -> bool

source

pub fn is_enum(&self) -> bool

source

pub fn as_struct(&self) -> Option<&Struct>

source

pub fn as_enum(&self) -> Option<&Enum>

source

pub fn meta(&self) -> Option<&Meta>

source

pub fn name(&self) -> &str

source

pub fn module_name(&self) -> Option<&str>

source

pub fn visibility(&self) -> Visibility

source

pub fn is_runtime(&self) -> bool

source

pub fn is_native(&self) -> bool

source

pub fn is_send(&self) -> bool

source

pub fn is_sync(&self) -> bool

source

pub fn is_copy(&self) -> bool

source

pub fn can_initialize(&self) -> bool

source

pub fn type_hash(&self) -> TypeHash

source

pub fn type_name(&self) -> &str

source

pub fn layout(&self) -> &Layout

source

pub fn struct_fields(&self) -> Option<&[StructField]>

source

pub fn enum_variants(&self) -> Option<&[EnumVariant]>

source

pub fn is_compatible(&self, other: &Type) -> bool

source

pub fn find_struct_fields<'a>( &'a self, query: StructFieldQuery<'a> ) -> Option<impl Iterator<Item = &'a StructField> + 'a>

source

pub fn find_struct_field<'a>( &'a self, query: StructFieldQuery<'a> ) -> Option<&'a StructField>

source

pub fn find_enum_variants<'a>( &'a self, query: EnumVariantQuery<'a> ) -> Option<impl Iterator<Item = &'a EnumVariant> + 'a>

source

pub fn find_enum_variant<'a>( &'a self, query: EnumVariantQuery<'a> ) -> Option<&'a EnumVariant>

source

pub unsafe fn try_copy(&self, from: *const u8, to: *mut u8) -> bool

§Safety
source

pub unsafe fn find_enum_variant_by_value<T>( &self, value: &T ) -> Option<&EnumVariant>
where T: 'static,

§Safety
source

pub unsafe fn initialize(&self, pointer: *mut ()) -> bool

§Safety
source

pub unsafe fn finalize(&self, pointer: *mut ())

§Safety
source

pub unsafe fn initializer(&self) -> Option<unsafe fn(_: *mut ())>

§Safety
source

pub unsafe fn finalizer(&self) -> unsafe fn(_: *mut ())

§Safety
source

pub fn into_handle(self) -> Arc<Type>

Trait Implementations§

source§

impl Debug for Type

source§

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

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

impl From<Enum> for Type

source§

fn from(value: Enum) -> Type

Converts to this type from the input type.
source§

impl From<Struct> for Type

source§

fn from(value: Struct) -> Type

Converts to this type from the input type.
source§

impl PartialEq for Type

source§

fn eq(&self, other: &Type) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for Type

Auto Trait Implementations§

§

impl Freeze for Type

§

impl RefUnwindSafe for Type

§

impl Send for Type

§

impl Sync for Type

§

impl Unpin for Type

§

impl UnwindSafe for Type

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> Finalize for T

source§

unsafe fn finalize_raw(data: *mut ())

Safety 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>,

§

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>,

§

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.