pub struct DataTracked<T, TLib> { /* private fields */ }
Expand description
A pointer to shared data which allows a user-provided ref-counting implementation to avoid outliving its library.
Implementations§
Source§impl<T, TLib> DataTracked<T, TLib>
impl<T, TLib> DataTracked<T, TLib>
Sourcepub fn new(data: DataUnsafe<T>, lib: TLib) -> Self
pub fn new(data: DataUnsafe<T>, lib: TLib) -> Self
Creates a new DataTracked. This should only be called within the library.
Trait Implementations§
Source§impl<T: Clone, TLib: Clone> Clone for DataTracked<T, TLib>
impl<T: Clone, TLib: Clone> Clone for DataTracked<T, TLib>
Source§fn clone(&self) -> DataTracked<T, TLib>
fn clone(&self) -> DataTracked<T, TLib>
Returns a copy 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 moreAuto Trait Implementations§
impl<T, TLib> Freeze for DataTracked<T, TLib>where
TLib: Freeze,
impl<T, TLib> RefUnwindSafe for DataTracked<T, TLib>where
TLib: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, TLib> !Send for DataTracked<T, TLib>
impl<T, TLib> !Sync for DataTracked<T, TLib>
impl<T, TLib> Unpin for DataTracked<T, TLib>where
TLib: Unpin,
impl<T, TLib> UnwindSafe for DataTracked<T, TLib>where
TLib: UnwindSafe,
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