pub enum KnownPointer {
Show 15 variants
Box,
Rc,
RcWeak,
Arc,
ArcWeak,
Cow,
Pin,
Cell,
RefCell,
OnceCell,
Mutex,
RwLock,
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)
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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more