pub struct TypeFlags(/* private fields */);
Expand description
Flags describing properties of a type
Implementations§
Source§impl TypeFlags
impl TypeFlags
pub const NONE: Self
Sourcepub const ALLOWED_FOR_SCOPED_BORROW: Self
pub const ALLOWED_FOR_SCOPED_BORROW: Self
Can be held on to for a short while
Sourcepub const IS_STORAGE: Self
pub const IS_STORAGE: Self
Can it be stored in a sum or product type
pub const IS_ALLOWED_RETURN: Self
pub const ALLOWED_FOR_VARIABLE: Self
pub const fn new() -> Self
pub const fn contains(self, flag: Self) -> bool
pub const fn union(self, other: Self) -> Self
Sourcepub fn compute_for_type_kind(kind: &TypeKind) -> Self
pub fn compute_for_type_kind(kind: &TypeKind) -> Self
Compute type flags based on the TypeKind
Trait Implementations§
impl Copy for TypeFlags
impl Eq for TypeFlags
impl StructuralPartialEq for TypeFlags
Auto Trait Implementations§
impl Freeze for TypeFlags
impl RefUnwindSafe for TypeFlags
impl Send for TypeFlags
impl Sync for TypeFlags
impl Unpin for TypeFlags
impl UnwindSafe for TypeFlags
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