Struct casper_rust_wasm_sdk::watcher::Watcher
source · pub struct Watcher { /* private fields */ }
Expand description
Represents a deploy watcher responsible for monitoring transaction events.
This struct allows clients to subscribe to transaction events, start watching for events, or wait for an event and handle the received deploy event data.
§Fields
events_url
- The URL for transaction events.subscriptions
- Vector containing deploy subscriptions.active
- Reference-counted cell indicating whether the deploy watcher is active.timeout_duration
- Duration representing the optional timeout for watching events.
Implementations§
source§impl Watcher
impl Watcher
sourcepub fn unsubscribe(&mut self, target_hash: String)
pub fn unsubscribe(&mut self, target_hash: String)
Unsubscribes from transaction events based on the provided transaction hash.
§Arguments
transaction_hash
- The transaction hash to unsubscribe.
This method removes the deploy subscription associated with the provided transaction hash.
Trait Implementations§
source§impl FromWasmAbi for Watcher
impl FromWasmAbi for Watcher
source§impl IntoWasmAbi for Watcher
impl IntoWasmAbi for Watcher
source§impl LongRefFromWasmAbi for Watcher
impl LongRefFromWasmAbi for Watcher
source§impl OptionFromWasmAbi for Watcher
impl OptionFromWasmAbi for Watcher
source§impl OptionIntoWasmAbi for Watcher
impl OptionIntoWasmAbi for Watcher
source§impl RefFromWasmAbi for Watcher
impl RefFromWasmAbi for Watcher
source§impl RefMutFromWasmAbi for Watcher
impl RefMutFromWasmAbi for Watcher
source§impl TryFromJsValue for Watcher
impl TryFromJsValue for Watcher
source§impl VectorFromWasmAbi for Watcher
impl VectorFromWasmAbi for Watcher
source§impl VectorIntoWasmAbi for Watcher
impl VectorIntoWasmAbi for Watcher
Auto Trait Implementations§
impl Freeze for Watcher
impl !RefUnwindSafe for Watcher
impl !Send for Watcher
impl !Sync for Watcher
impl Unpin for Watcher
impl !UnwindSafe for Watcher
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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,
§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
.