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 LoadedComponentwhere
*const ArcInner<Library> is !null: Freeze,
PhantomData<ArcInner<Library>>: Freeze,
*const ArcInner<SidecarProcess> is !null: Freeze,
PhantomData<ArcInner<SidecarProcess>>: Freeze,
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
*const AlefComponentV1 is !null: Freeze,
PhantomData<AlefComponentV1>: Freeze,
*const AlefHostApiV1 is !null: Freeze,
PhantomData<AlefHostApiV1>: Freeze,
*const Arc<dyn HostServices> is !null: Freeze,
PhantomData<Arc<dyn HostServices>>: Freeze,
impl Move for LoadedComponent
impl Unpin for LoadedComponent
impl UnsafeUnpin for LoadedComponentwhere
*const ArcInner<Library> is !null: UnsafeUnpin,
PhantomData<ArcInner<Library>>: UnsafeUnpin,
*const ArcInner<SidecarProcess> is !null: UnsafeUnpin,
PhantomData<ArcInner<SidecarProcess>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const AlefComponentV1 is !null: UnsafeUnpin,
PhantomData<AlefComponentV1>: UnsafeUnpin,
*const AlefHostApiV1 is !null: UnsafeUnpin,
PhantomData<AlefHostApiV1>: UnsafeUnpin,
*const Arc<dyn HostServices> is !null: UnsafeUnpin,
PhantomData<Arc<dyn HostServices>>: UnsafeUnpin,
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