pub struct JsMemoryStorage { /* private fields */ }Expand description
Simple in-memory storage for demo purposes
Implementations§
Source§impl JsMemoryStorage
impl JsMemoryStorage
pub fn new() -> JsMemoryStorage
pub fn save_decision(&mut self, decision: &JsDecisionSnapshot) -> String
pub fn load_decision( &self, decision_id: &str, ) -> Result<JsDecisionSnapshot, JsError>
pub fn health_check(&self) -> bool
Trait Implementations§
Source§impl Default for JsMemoryStorage
impl Default for JsMemoryStorage
Source§impl From<JsMemoryStorage> for JsValue
impl From<JsMemoryStorage> for JsValue
Source§fn from(value: JsMemoryStorage) -> Self
fn from(value: JsMemoryStorage) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for JsMemoryStorage
impl FromWasmAbi for JsMemoryStorage
Source§impl IntoWasmAbi for JsMemoryStorage
impl IntoWasmAbi for JsMemoryStorage
Source§impl LongRefFromWasmAbi for JsMemoryStorage
impl LongRefFromWasmAbi for JsMemoryStorage
Source§impl OptionFromWasmAbi for JsMemoryStorage
impl OptionFromWasmAbi for JsMemoryStorage
Source§impl OptionIntoWasmAbi for JsMemoryStorage
impl OptionIntoWasmAbi for JsMemoryStorage
Source§impl RefFromWasmAbi for JsMemoryStorage
impl RefFromWasmAbi for JsMemoryStorage
Source§type Anchor = RcRef<JsMemoryStorage>
type Anchor = RcRef<JsMemoryStorage>
The type that holds the reference to
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl RefMutFromWasmAbi for JsMemoryStorage
impl RefMutFromWasmAbi for JsMemoryStorage
Source§impl TryFromJsValue for JsMemoryStorage
impl TryFromJsValue for JsMemoryStorage
Source§impl VectorFromWasmAbi for JsMemoryStorage
impl VectorFromWasmAbi for JsMemoryStorage
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[JsMemoryStorage]>
Source§impl VectorIntoWasmAbi for JsMemoryStorage
impl VectorIntoWasmAbi for JsMemoryStorage
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[JsMemoryStorage]>) -> Self::Abi
Source§impl WasmDescribeVector for JsMemoryStorage
impl WasmDescribeVector for JsMemoryStorage
impl SupportsConstructor for JsMemoryStorage
impl SupportsInstanceProperty for JsMemoryStorage
impl SupportsStaticProperty for JsMemoryStorage
Auto Trait Implementations§
impl Freeze for JsMemoryStorage
impl RefUnwindSafe for JsMemoryStorage
impl Send for JsMemoryStorage
impl Sync for JsMemoryStorage
impl Unpin for JsMemoryStorage
impl UnwindSafe for JsMemoryStorage
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> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.