pub struct TokenRegistry { /* private fields */ }
Implementations§
Source§impl TokenRegistry
impl TokenRegistry
pub fn new() -> Self
Sourcepub fn get_token<T: TokenInterface>(
owner: Pin<&Tokenizable<T>>,
) -> Result<Handle, Status>
pub fn get_token<T: TokenInterface>( owner: Pin<&Tokenizable<T>>, ) -> Result<Handle, Status>
Returns a token for the owner, creating one if one doesn’t already exist. Tokens will be automatically removed when Tokenizable is dropped.
Auto Trait Implementations§
impl !Freeze for TokenRegistry
impl RefUnwindSafe for TokenRegistry
impl Send for TokenRegistry
impl Sync for TokenRegistry
impl Unpin for TokenRegistry
impl UnwindSafe for TokenRegistry
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