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