pub struct ProcessOwned<T> { /* private fields */ }
Expand description
A value that is owned by the process itself.
The lifetime of a value is tied to its owner. When the
owner is dropped, the value is dropped as well. This
object uses the Rc
type internally to ensure that
the value is only dropped when the last owner is dropped.
The specific implementation is subject to change for
performance reasons.
When a ProcessOwned
is initialized as a global static
variable with the lazy_static
crate, it will never be
dropped. This allows values to easily and clearly share
the scope of the entire process.
Implementations§
Trait Implementations§
Source§impl<T: Clone> Clone for ProcessOwned<T>
impl<T: Clone> Clone for ProcessOwned<T>
Source§fn clone(&self) -> ProcessOwned<T>
fn clone(&self) -> ProcessOwned<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<T: Debug> Debug for ProcessOwned<T>
impl<T: Debug> Debug for ProcessOwned<T>
Auto Trait Implementations§
impl<T> Freeze for ProcessOwned<T>
impl<T> RefUnwindSafe for ProcessOwned<T>where
T: RefUnwindSafe,
impl<T> !Send for ProcessOwned<T>
impl<T> !Sync for ProcessOwned<T>
impl<T> Unpin for ProcessOwned<T>
impl<T> UnwindSafe for ProcessOwned<T>where
T: RefUnwindSafe,
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