pub enum KnownPointer {
Show 17 variants
Box,
Rc,
RcWeak,
Arc,
ArcWeak,
Cow,
Pin,
Cell,
RefCell,
OnceCell,
Mutex,
RwLock,
OnceLock,
LazyLock,
NonNull,
SharedReference,
ExclusiveReference,
}Expand description
Represents common standard library pointer kinds
Variants§
Box
Box<T>, heap-allocated values with single ownership
Rc
Rc<T>, reference-counted values with multiple ownership
RcWeak
Weak<T>, a weak reference to an Rc-managed value
Arc
Arc<T>, thread-safe reference-counted values with multiple ownership
ArcWeak
Weak<T>, a weak reference to an Arc-managed value
Cow
Cow<'a, T>, a clone-on-write smart pointer
Pin
Pin<P>, a type that pins values behind a pointer
Cell
Cell<T>, a mutable memory location with interior mutability
RefCell
RefCell<T>, a mutable memory location with dynamic borrowing rules
OnceCell
OnceCell<T>, a cell that can be written to only once
Mutex
Mutex<T>, a mutual exclusion primitive (requires std)
RwLock
RwLock<T>, a reader-writer lock (requires std)
OnceLock
OnceLock<T>, a cell that can be written to only once (requires std)
LazyLock
LazyLock<T, F>, a lazy-initialized value (requires std)
NonNull
NonNull<T>, a wrapper around a raw pointer that is not null
&T
ExclusiveReference
&mut T
Trait Implementations§
Source§impl Clone for KnownPointer
impl Clone for KnownPointer
Source§fn clone(&self) -> KnownPointer
fn clone(&self) -> KnownPointer
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for KnownPointer
impl Debug for KnownPointer
Source§impl Hash for KnownPointer
impl Hash for KnownPointer
Source§impl PartialEq for KnownPointer
impl PartialEq for KnownPointer
Source§fn eq(&self, other: &KnownPointer) -> bool
fn eq(&self, other: &KnownPointer) -> bool
self and other values to be equal, and is used by ==.impl Copy for KnownPointer
impl Eq for KnownPointer
impl StructuralPartialEq for KnownPointer
Auto Trait Implementations§
impl Freeze for KnownPointer
impl RefUnwindSafe for KnownPointer
impl Send for KnownPointer
impl Sync for KnownPointer
impl Unpin for KnownPointer
impl UnsafeUnpin for KnownPointer
impl UnwindSafe for KnownPointer
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.