pub struct JsCoMap { /* private fields */ }Implementations§
Source§impl JsCoMap
impl JsCoMap
pub fn new(cid: JsValue) -> Result<Self, JsValue>
pub fn default() -> Self
pub async fn open( &self, storage: &JsBlockStorage, ) -> Result<JsCoMapTransaction, JsValue>
pub async fn commit( &mut self, transaction: JsCoMapTransaction, ) -> Result<(), JsValue>
pub fn is_empty(&self) -> bool
pub async fn get( &self, storage: &JsBlockStorage, key: JsValue, ) -> Result<Option<JsValue>, JsValue>
pub async fn contains_key( &self, storage: &JsBlockStorage, key: JsValue, ) -> Result<bool, JsValue>
pub async fn insert( &mut self, storage: &JsBlockStorage, key: JsValue, value: JsValue, ) -> Result<(), JsValue>
pub fn stream(&self, storage: &JsBlockStorage) -> ReadableStream
pub fn cid(&self) -> Result<Option<Uint8Array>, JsValue>
Trait Implementations§
Source§impl FromWasmAbi for JsCoMap
impl FromWasmAbi for JsCoMap
Source§impl IntoWasmAbi for JsCoMap
impl IntoWasmAbi for JsCoMap
Source§impl LongRefFromWasmAbi for JsCoMap
impl LongRefFromWasmAbi for JsCoMap
Source§impl OptionFromWasmAbi for JsCoMap
impl OptionFromWasmAbi for JsCoMap
Source§impl OptionIntoWasmAbi for JsCoMap
impl OptionIntoWasmAbi for JsCoMap
Source§impl RefFromWasmAbi for JsCoMap
impl RefFromWasmAbi for JsCoMap
Source§impl RefMutFromWasmAbi for JsCoMap
impl RefMutFromWasmAbi for JsCoMap
Source§impl TryFromJsValue for JsCoMap
impl TryFromJsValue for JsCoMap
Source§impl VectorFromWasmAbi for JsCoMap
impl VectorFromWasmAbi for JsCoMap
Source§impl VectorIntoWasmAbi for JsCoMap
impl VectorIntoWasmAbi for JsCoMap
impl SupportsConstructor for JsCoMap
impl SupportsInstanceProperty for JsCoMap
impl SupportsStaticProperty for JsCoMap
Auto Trait Implementations§
impl Freeze for JsCoMap
impl RefUnwindSafe for JsCoMap
impl Send for JsCoMap
impl Sync for JsCoMap
impl Unpin for JsCoMap
impl UnsafeUnpin for JsCoMap
impl UnwindSafe for JsCoMap
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> 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 moreSource§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.