pub struct JsMorpheusState { /* private fields */ }
Implementations§
Source§impl JsMorpheusState
impl JsMorpheusState
pub fn new() -> Result<JsMorpheusState, JsValue>
pub fn is_corrupted(&self) -> bool
pub fn last_seen_height(&self) -> Result<BlockHeight, JsValue>
pub fn is_confirmed(&self, txid: &str) -> Result<Option<bool>, JsValue>
pub fn before_proof_exists_at( &self, content_id: &str, height_opt: Option<BlockHeight>, ) -> Result<bool, JsValue>
pub fn before_proof_history(&self, content_id: &str) -> Result<JsValue, JsValue>
pub fn get_tx_ids( &self, did: &str, include_attempts: bool, from_height_inc: BlockHeight, until_height_inc: Option<BlockHeight>, ) -> Result<JsValue, JsValue>
pub fn last_tx_id(&self, did: &str) -> Result<Option<String>, JsValue>
pub fn get_doc_at( &self, did_data: &str, height_opt: Option<BlockHeight>, ) -> Result<JsValue, JsValue>
pub fn dry_run(&self, asset: &JsValue) -> Result<Vec<JsValue>, JsValue>
pub fn block_applying(&mut self, height: BlockHeight) -> Result<(), JsValue>
pub fn apply_transaction( &mut self, txid: &str, asset: &JsValue, ) -> Result<(), JsValue>
pub fn block_reverting(&mut self, height: BlockHeight) -> Result<(), JsValue>
pub fn revert_transaction( &mut self, txid: &str, asset: &JsValue, ) -> Result<(), JsValue>
Trait Implementations§
Source§impl From<JsMorpheusState> for JsValue
impl From<JsMorpheusState> for JsValue
Source§fn from(value: JsMorpheusState) -> Self
fn from(value: JsMorpheusState) -> Self
Converts to this type from the input type.
Source§impl From<StateHolder> for JsMorpheusState
impl From<StateHolder> for JsMorpheusState
Source§fn from(inner: MorpheusState) -> Self
fn from(inner: MorpheusState) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for JsMorpheusState
impl FromWasmAbi for JsMorpheusState
Source§impl IntoWasmAbi for JsMorpheusState
impl IntoWasmAbi for JsMorpheusState
Source§impl LongRefFromWasmAbi for JsMorpheusState
impl LongRefFromWasmAbi for JsMorpheusState
Source§impl OptionFromWasmAbi for JsMorpheusState
impl OptionFromWasmAbi for JsMorpheusState
Source§impl OptionIntoWasmAbi for JsMorpheusState
impl OptionIntoWasmAbi for JsMorpheusState
Source§impl RefFromWasmAbi for JsMorpheusState
impl RefFromWasmAbi for JsMorpheusState
Source§type Anchor = RcRef<JsMorpheusState>
type Anchor = RcRef<JsMorpheusState>
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 JsMorpheusState
impl RefMutFromWasmAbi for JsMorpheusState
Source§impl TryFromJsValue for JsMorpheusState
impl TryFromJsValue for JsMorpheusState
Source§impl VectorFromWasmAbi for JsMorpheusState
impl VectorFromWasmAbi for JsMorpheusState
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[JsMorpheusState]>
Source§impl VectorIntoJsValue for JsMorpheusState
impl VectorIntoJsValue for JsMorpheusState
fn vector_into_jsvalue(vector: Box<[JsMorpheusState]>) -> JsValue
Source§impl VectorIntoWasmAbi for JsMorpheusState
impl VectorIntoWasmAbi for JsMorpheusState
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[JsMorpheusState]>) -> Self::Abi
Source§impl WasmDescribeVector for JsMorpheusState
impl WasmDescribeVector for JsMorpheusState
Source§impl Wraps<StateHolder> for JsMorpheusState
impl Wraps<StateHolder> for JsMorpheusState
Source§fn inner(&self) -> &MorpheusState
fn inner(&self) -> &MorpheusState
Converts a reference to a WASM type to a reference to the underlying Rust type.
impl SupportsConstructor for JsMorpheusState
impl SupportsInstanceProperty for JsMorpheusState
impl SupportsStaticProperty for JsMorpheusState
Auto Trait Implementations§
impl Freeze for JsMorpheusState
impl RefUnwindSafe for JsMorpheusState
impl Send for JsMorpheusState
impl Sync for JsMorpheusState
impl Unpin for JsMorpheusState
impl UnwindSafe for JsMorpheusState
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::Abi
Source§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
.