pub struct HostFunctionDetails {
pub host_functions: Option<Vec<HostFunctionDefinition>>,
}
Expand description
HostFunctionDetails
represents the set of functions that the host exposes to the guest.
Fields§
§host_functions: Option<Vec<HostFunctionDefinition>>
The host functions.
Implementations§
Source§impl HostFunctionDetails
impl HostFunctionDetails
Sourcepub fn new(host_functions: Option<Vec<HostFunctionDefinition>>) -> Self
pub fn new(host_functions: Option<Vec<HostFunctionDefinition>>) -> Self
Create a new HostFunctionDetails
.
Sourcepub fn insert_host_function(&mut self, host_function: HostFunctionDefinition)
pub fn insert_host_function(&mut self, host_function: HostFunctionDefinition)
Insert a host function into the host function details.
Sourcepub fn sort_host_functions_by_name(&mut self)
pub fn sort_host_functions_by_name(&mut self)
Sort the host functions by name.
Sourcepub fn find_by_function_name(
&self,
function_name: &str,
) -> Option<HostFunctionDefinition>
pub fn find_by_function_name( &self, function_name: &str, ) -> Option<HostFunctionDefinition>
Find a host function by name.
Trait Implementations§
Source§impl Clone for HostFunctionDetails
impl Clone for HostFunctionDetails
Source§fn clone(&self) -> HostFunctionDetails
fn clone(&self) -> HostFunctionDetails
Returns a copy of the value. Read more
1.0.0 · 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 HostFunctionDetails
impl Debug for HostFunctionDetails
Source§impl Default for HostFunctionDetails
impl Default for HostFunctionDetails
Source§fn default() -> HostFunctionDetails
fn default() -> HostFunctionDetails
Returns the “default value” for a type. Read more
Source§impl TryFrom<&[u8]> for HostFunctionDetails
impl TryFrom<&[u8]> for HostFunctionDetails
Auto Trait Implementations§
impl Freeze for HostFunctionDetails
impl RefUnwindSafe for HostFunctionDetails
impl Send for HostFunctionDetails
impl Sync for HostFunctionDetails
impl Unpin for HostFunctionDetails
impl UnwindSafe for HostFunctionDetails
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