Enum intuicio_essentials::prelude::Type
source · pub enum Type {
Struct(Struct),
Enum(Enum),
}
Variants§
Implementations§
source§impl Type
impl Type
pub fn is_struct(&self) -> bool
pub fn is_enum(&self) -> bool
pub fn as_struct(&self) -> Option<&Struct>
pub fn as_enum(&self) -> Option<&Enum>
pub fn meta(&self) -> Option<&Meta>
pub fn name(&self) -> &str
pub fn module_name(&self) -> Option<&str>
pub fn visibility(&self) -> Visibility
pub fn is_runtime(&self) -> bool
pub fn is_native(&self) -> bool
pub fn is_send(&self) -> bool
pub fn is_sync(&self) -> bool
pub fn is_copy(&self) -> bool
pub fn can_initialize(&self) -> bool
pub fn type_hash(&self) -> TypeHash
pub fn type_name(&self) -> &str
pub fn layout(&self) -> &Layout
pub fn struct_fields(&self) -> Option<&[StructField]>
pub fn enum_variants(&self) -> Option<&[EnumVariant]>
pub fn is_compatible(&self, other: &Type) -> bool
pub fn find_struct_fields<'a>( &'a self, query: StructFieldQuery<'a> ) -> Option<impl Iterator<Item = &'a StructField> + 'a>
pub fn find_struct_field<'a>( &'a self, query: StructFieldQuery<'a> ) -> Option<&'a StructField>
pub fn find_enum_variants<'a>( &'a self, query: EnumVariantQuery<'a> ) -> Option<impl Iterator<Item = &'a EnumVariant> + 'a>
pub fn find_enum_variant<'a>( &'a self, query: EnumVariantQuery<'a> ) -> Option<&'a EnumVariant>
sourcepub unsafe fn find_enum_variant_by_value<T>(
&self,
value: &T
) -> Option<&EnumVariant>where
T: 'static,
pub unsafe fn find_enum_variant_by_value<T>(
&self,
value: &T
) -> Option<&EnumVariant>where
T: 'static,
§Safety
pub fn into_handle(self) -> Arc<Type>
Trait Implementations§
source§impl PartialEq for Type
impl PartialEq for Type
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more