pub struct ModuleReaderHandle(/* private fields */);Expand description
Wrapper that lets a live GuestModuleReader ride RuntimeCommand despite its
derive(Debug, Clone, PartialEq): the trait object lives behind an
Arc<Mutex<Option<..>>>, and the dispatch thread take()s it out exactly once.
Implementations§
Source§impl ModuleReaderHandle
impl ModuleReaderHandle
pub fn new(reader: Box<dyn GuestModuleReader>) -> Self
Sourcepub fn take(&self) -> Option<Box<dyn GuestModuleReader>>
pub fn take(&self) -> Option<Box<dyn GuestModuleReader>>
Take the reader out (dispatch-thread side); None if already taken.
Trait Implementations§
Source§impl Clone for ModuleReaderHandle
impl Clone for ModuleReaderHandle
Source§fn clone(&self) -> ModuleReaderHandle
fn clone(&self) -> ModuleReaderHandle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ModuleReaderHandle
impl Debug for ModuleReaderHandle
Source§impl PartialEq for ModuleReaderHandle
impl PartialEq for ModuleReaderHandle
Auto Trait Implementations§
impl Freeze for ModuleReaderHandle
impl RefUnwindSafe for ModuleReaderHandle
impl Send for ModuleReaderHandle
impl Sync for ModuleReaderHandle
impl Unpin for ModuleReaderHandle
impl UnsafeUnpin for ModuleReaderHandle
impl UnwindSafe for ModuleReaderHandle
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