Struct spin_core::HostComponentsData
source · pub struct HostComponentsData { /* private fields */ }
Expand description
Holds a heterogenous set of HostComponent::Data
s.
Implementations§
source§impl HostComponentsData
impl HostComponentsData
sourcepub fn set<HC: HostComponent>(
&mut self,
handle: HostComponentDataHandle<HC>,
data: HC::Data
)
pub fn set<HC: HostComponent>(
&mut self,
handle: HostComponentDataHandle<HC>,
data: HC::Data
)
Sets the HostComponent::Data
for the given handle
.
sourcepub fn get_or_insert<HC: HostComponent>(
&mut self,
handle: HostComponentDataHandle<HC>
) -> &mut HC::Data
pub fn get_or_insert<HC: HostComponent>(
&mut self,
handle: HostComponentDataHandle<HC>
) -> &mut HC::Data
Retrieves a mutable reference to HostComponent::Data
for the given handle
.
If unset, the data will be initialized with HostComponent::build_data
.
Auto Trait Implementations§
impl !RefUnwindSafe for HostComponentsData
impl Send for HostComponentsData
impl !Sync for HostComponentsData
impl Unpin for HostComponentsData
impl !UnwindSafe for HostComponentsData
Blanket Implementations§
§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
§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.