pub struct CodeStore<S: Db> { /* private fields */ }Expand description
Storage for our webassembly code
Implementations§
Source§impl<S: Db> CodeStore<S>
impl<S: Db> CodeStore<S>
pub fn new(db: &S) -> Result<Self>
pub fn with_cache_size(db: &S, cache_size: NonZeroUsize) -> Result<Self>
pub fn insert_contract(&self, cid: ContractId, module: Module) -> Result<()>
pub fn insert_swagent(&self, aid: AgentId, module: Module) -> Result<()>
pub fn get_contract( &mut self, cid: &ContractId, engine: &Engine, store: &mut Store<VmState<S>>, linker: &mut Linker<VmState<S>>, ) -> Result<Option<Instance>>
pub async fn get_agent( &mut self, aid: &AgentId, engine: &Engine, store: &mut Store<VmState<S>>, linker: &mut Linker<VmState<S>>, ) -> Result<Option<Instance>>
pub fn available_contracts(&self) -> Result<Vec<ContractId>>
pub fn available_swagents(&self) -> Result<Vec<AgentId>>
Trait Implementations§
Auto Trait Implementations§
impl<S> Freeze for CodeStore<S>where
S: Freeze,
impl<S> !RefUnwindSafe for CodeStore<S>
impl<S> Send for CodeStore<S>
impl<S> Sync for CodeStore<S>
impl<S> Unpin for CodeStore<S>where
S: Unpin,
impl<S> !UnwindSafe for CodeStore<S>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more