pub struct LoadedComponent { /* private fields */ }Implementations§
Source§impl LoadedComponent
impl LoadedComponent
Sourcepub fn invoke_bytes(
&self,
method: &str,
payload: &[u8],
) -> Result<Vec<u8>, ComponentError>
pub fn invoke_bytes( &self, method: &str, payload: &[u8], ) -> Result<Vec<u8>, ComponentError>
Invoke a named bytes-only method on this contract’s stdio component.
Native typed function tables require their generated bindings and do not implement this operation. Stdio components likewise cannot expose typed C function tables.
pub fn component_id(&self) -> &str
pub fn component_version(&self) -> &str
pub fn descriptor(&self) -> &AlefComponentV1
pub fn contract(&self) -> *const c_void
pub fn contract_size(&self) -> usize
pub fn contract_table<T: AlefContract>(&self) -> Result<&T, ComponentError>
Sourcepub fn instantiate<T: AlefContract>(
self: &Arc<Self>,
) -> Result<ComponentInstance<T>, ComponentError>
pub fn instantiate<T: AlefContract>( self: &Arc<Self>, ) -> Result<ComponentInstance<T>, ComponentError>
Create an instance and bind it to a generated contract-table type.
pub fn host_api(&self) -> &AlefHostApiV1
pub fn strong_library_references(&self) -> usize
Trait Implementations§
impl Send for LoadedComponent
impl Sync for LoadedComponent
Auto Trait Implementations§
impl !RefUnwindSafe for LoadedComponent
impl !UnwindSafe for LoadedComponent
impl Forget for LoadedComponent
impl Freeze for LoadedComponent
impl Move for LoadedComponent
impl Unpin for LoadedComponent
impl UnsafeUnpin for LoadedComponent
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