Struct wasmtime_wasi::preview2::OccupiedEntry
source · pub struct OccupiedEntry<'a> { /* private fields */ }
Expand description
Like std::collections::hash_map::OccupiedEntry
, with a subset of
methods available in order to uphold Table
invariants.
Implementations§
source§impl<'a> OccupiedEntry<'a>
impl<'a> OccupiedEntry<'a>
sourcepub fn get(&self) -> &(dyn Any + Send + Sync + 'static)
pub fn get(&self) -> &(dyn Any + Send + Sync + 'static)
Get the dynamically-typed reference to the resource.
sourcepub fn get_mut(&mut self) -> &mut (dyn Any + Send + Sync + 'static)
pub fn get_mut(&mut self) -> &mut (dyn Any + Send + Sync + 'static)
Get the dynamically-typed mutable reference to the resource.
sourcepub fn remove_entry(self) -> Result<Box<dyn Any + Send + Sync>, TableError>
pub fn remove_entry(self) -> Result<Box<dyn Any + Send + Sync>, TableError>
Remove the resource from the table, returning the contents of the
resource.
May fail with TableError::HasChildren
if the entry has any
children, see Table::push_child
.
If this method fails, the OccupiedEntry
is consumed, but the
resource remains in the table.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for OccupiedEntry<'a>
impl<'a> Send for OccupiedEntry<'a>
impl<'a> Sync for OccupiedEntry<'a>
impl<'a> Unpin for OccupiedEntry<'a>
impl<'a> !UnwindSafe for OccupiedEntry<'a>
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
source§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where T: AsFilelike,
Query the “status” flags for the
self
file descriptor.source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where T: AsFilelike,
source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where T: AsFilelike,
Set the “status” flags for the
self
file descriptor. Read more