Struct intrusive_collections::UnsafeRef [−][src]
pub struct UnsafeRef<T: ?Sized> { /* fields omitted */ }
Expand description
Unchecked shared pointer
This type acts like a Rc
or Arc
except that no reference count is
maintained. Instead, the user is responsible for freeing the managed object
once it is no longer in use.
You must guarantee that an object managed by an UnsafeRef
is not
moved, dropped or accessed through a mutable reference as long as at least
one UnsafeRef
is pointing to it.
Implementations
Converts an UnsafeRef
into a Box
Safety
You must ensure that this is the only UnsafeRef
managing this
object and that it is not currently a member of any intrusive
collections. This operation is only valid if the UnsafeRef
was
created using UnsafeRef::from_box
.
Trait Implementations
Auto Trait Implementations
impl<T: ?Sized> RefUnwindSafe for UnsafeRef<T> where
T: RefUnwindSafe,
impl<T: ?Sized> UnwindSafe for UnsafeRef<T> where
T: RefUnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more