pub struct Type {
pub id: TypeId,
pub flags: TypeFlags,
pub kind: Rc<TypeKind>,
}
Fields§
§id: TypeId
§flags: TypeFlags
§kind: Rc<TypeKind>
Implementations§
Source§impl Type
impl Type
pub fn compatible_with_storage_and_view( &self, other_view: &Self, type_cache: &mut TypeCache, ) -> bool
pub fn lowest_common_denominator_vec_like_view(&self) -> Option<TypeKind>
pub fn strict_compatible_with_capacity(&self, other: &Self) -> bool
Source§impl Type
impl Type
pub const fn is_scalar(&self) -> bool
pub const fn can_be_stored_in_field(&self) -> bool
pub const fn can_be_stored_in_transient_field(&self) -> bool
pub const fn can_be_stored_in_variable(&self) -> bool
pub fn is_option(&self) -> bool
pub const fn is_storage(&self) -> bool
pub const fn allowed_as_return_type(&self) -> bool
pub const fn allowed_as_parameter_type(&self) -> bool
pub const fn allowed_for_scoped_borrow(&self) -> bool
pub const fn can_be_materialized(&self) -> bool
Sourcepub fn collection_view_that_needs_explicit_storage(&self) -> bool
pub fn collection_view_that_needs_explicit_storage(&self) -> bool
Check if this type requires explicit collection storage allocation from caller This includes all aggregate types including optionals that need memory allocation and proper setup of the r0 register by the caller
Trait Implementations§
impl Eq 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