Struct rustc_data_structures::tagged_ptr::copy::CopyTaggedPtr [−][src]
pub struct CopyTaggedPtr<P, T, const COMPARE_PACKED: bool> where
P: Pointer,
T: Tag, { packed: NonZeroUsize, data: PhantomData<(P, T)>, }
Expand description
A Copy TaggedPtr.
You should use this instead of the TaggedPtr type in all cases where
P: Copy.
If COMPARE_PACKED is true, then the pointers will be compared and hashed without
unpacking. Otherwise we don’t implement PartialEq/Eq/Hash; if you want that,
wrap the TaggedPtr.
Fields
packed: NonZeroUsizedata: PhantomData<(P, T)>Implementations
impl<P, T, const COMPARE_PACKED: bool> CopyTaggedPtr<P, T, COMPARE_PACKED> where
P: Pointer,
T: Tag, [src]
impl<P, T, const COMPARE_PACKED: bool> CopyTaggedPtr<P, T, COMPARE_PACKED> where
P: Pointer,
T: Tag, [src]const TAG_BIT_SHIFT: usize[src]
const ASSERTION: ()[src]
pub fn new(pointer: P, tag: T) -> Self[src]
pub(super) fn pointer_raw(&self) -> usize[src]
pub fn pointer(self) -> P where
P: Copy, [src]
P: Copy,
pub fn pointer_ref(&self) -> &P::Target[src]
pub fn pointer_mut(&mut self) -> &mut P::Target where
P: DerefMut, [src]
P: DerefMut,
pub fn tag(&self) -> T[src]
pub fn set_tag(&mut self, tag: T)[src]
Trait Implementations
impl<P, T, const COMPARE_PACKED: bool> Clone for CopyTaggedPtr<P, T, COMPARE_PACKED> where
P: Pointer,
T: Tag,
P: Copy, [src]
impl<P, T, const COMPARE_PACKED: bool> Clone for CopyTaggedPtr<P, T, COMPARE_PACKED> where
P: Pointer,
T: Tag,
P: Copy, [src]impl<P, T, const COMPARE_PACKED: bool> Debug for CopyTaggedPtr<P, T, COMPARE_PACKED> where
P: Pointer,
P::Target: Debug,
T: Tag + Debug, [src]
impl<P, T, const COMPARE_PACKED: bool> Debug for CopyTaggedPtr<P, T, COMPARE_PACKED> where
P: Pointer,
P::Target: Debug,
T: Tag + Debug, [src]impl<P, T, const COMPARE_PACKED: bool> Deref for CopyTaggedPtr<P, T, COMPARE_PACKED> where
P: Pointer,
T: Tag, [src]
impl<P, T, const COMPARE_PACKED: bool> Deref for CopyTaggedPtr<P, T, COMPARE_PACKED> where
P: Pointer,
T: Tag, [src]impl<P, T, const COMPARE_PACKED: bool> DerefMut for CopyTaggedPtr<P, T, COMPARE_PACKED> where
P: Pointer + DerefMut,
T: Tag, [src]
impl<P, T, const COMPARE_PACKED: bool> DerefMut for CopyTaggedPtr<P, T, COMPARE_PACKED> where
P: Pointer + DerefMut,
T: Tag, [src]impl<P, T> Hash for CopyTaggedPtr<P, T, true> where
P: Pointer,
T: Tag, [src]
impl<P, T> Hash for CopyTaggedPtr<P, T, true> where
P: Pointer,
T: Tag, [src]impl<P, T, HCX, const COMPARE_PACKED: bool> HashStable<HCX> for CopyTaggedPtr<P, T, COMPARE_PACKED> where
P: Pointer + HashStable<HCX>,
T: Tag + HashStable<HCX>, [src]
impl<P, T, HCX, const COMPARE_PACKED: bool> HashStable<HCX> for CopyTaggedPtr<P, T, COMPARE_PACKED> where
P: Pointer + HashStable<HCX>,
T: Tag + HashStable<HCX>, [src]fn hash_stable(&self, hcx: &mut HCX, hasher: &mut StableHasher)[src]
impl<P, T> PartialEq<CopyTaggedPtr<P, T, true>> for CopyTaggedPtr<P, T, true> where
P: Pointer,
T: Tag, [src]
impl<P, T> PartialEq<CopyTaggedPtr<P, T, true>> for CopyTaggedPtr<P, T, true> where
P: Pointer,
T: Tag, [src]impl<P, T, const COMPARE_PACKED: bool> Copy for CopyTaggedPtr<P, T, COMPARE_PACKED> where
P: Pointer,
T: Tag,
P: Copy, [src]
P: Pointer,
T: Tag,
P: Copy,
impl<P, T> Eq for CopyTaggedPtr<P, T, true> where
P: Pointer,
T: Tag, [src]
P: Pointer,
T: Tag,
Auto Trait Implementations
impl<P, T, const COMPARE_PACKED: bool> RefUnwindSafe for CopyTaggedPtr<P, T, COMPARE_PACKED> where
P: RefUnwindSafe,
T: RefUnwindSafe,
P: RefUnwindSafe,
T: RefUnwindSafe,
impl<P, T, const COMPARE_PACKED: bool> Send for CopyTaggedPtr<P, T, COMPARE_PACKED> where
P: Send,
T: Send,
P: Send,
T: Send,
impl<P, T, const COMPARE_PACKED: bool> Sync for CopyTaggedPtr<P, T, COMPARE_PACKED> where
P: Sync,
T: Sync,
P: Sync,
T: Sync,
impl<P, T, const COMPARE_PACKED: bool> Unpin for CopyTaggedPtr<P, T, COMPARE_PACKED> where
P: Unpin,
T: Unpin,
P: Unpin,
T: Unpin,
impl<P, T, const COMPARE_PACKED: bool> UnwindSafe for CopyTaggedPtr<P, T, COMPARE_PACKED> where
P: UnwindSafe,
T: UnwindSafe,
P: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<'a, T> Captures<'a> for T where
T: ?Sized, [src]
T: ?Sized,