pub struct TaggedPointer<const BITS: u8> { /* private fields */ }
Implementations§
Source§impl<const BITS: u8> TaggedPointer<BITS>
impl<const BITS: u8> TaggedPointer<BITS>
pub fn new<T, const TAG: usize>(value: T) -> Selfwhere
T: TaggedPointerValue,
pub fn is<const TAG: usize>(&self) -> bool
pub fn unwrap<T>(self) -> Twhere
T: TaggedPointerValue,
pub fn borrow_value<T, U>(&self) -> &Uwhere
T: TaggedPointerValue + Borrow<U>,
pub fn tag(&self) -> usize
pub fn without_tag(&self) -> usize
pub fn drop_as<T>(&mut self)where
T: TaggedPointerValue,
pub fn take(&mut self) -> Self
pub fn format_as<T>(&self, variant_name: &str, f: &mut Formatter<'_>) -> Resultwhere
T: TaggedPointerValue + Debug,
pub fn clone_as<T, const TAG: usize>(&self) -> Selfwhere
T: TaggedPointerValue + Clone,
pub fn compare_as<T>(&self, other: &Self) -> boolwhere
T: TaggedPointerValue + PartialEq,
Auto Trait Implementations§
impl<const BITS: u8> Freeze for TaggedPointer<BITS>
impl<const BITS: u8> RefUnwindSafe for TaggedPointer<BITS>
impl<const BITS: u8> Send for TaggedPointer<BITS>
impl<const BITS: u8> Sync for TaggedPointer<BITS>
impl<const BITS: u8> Unpin for TaggedPointer<BITS>
impl<const BITS: u8> UnwindSafe for TaggedPointer<BITS>
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