Struct workflow_wasm::channel::EventDispatcher
source · pub struct EventDispatcher { /* private fields */ }
Expand description
EventDispatcher
is an object meant to be used in WASM environment to
process channel events.
Implementations§
source§impl EventDispatcher
impl EventDispatcher
pub async fn start_notification_task<T>( &self, multiplexer: &Multiplexer<T> ) -> Result<()>where T: Clone + Serialize + Send + Sync + 'static,
source§impl EventDispatcher
impl EventDispatcher
pub fn new() -> EventDispatcher
pub fn listener(&self) -> JsValue
pub fn listener_setter(&self, callback: JsValue) -> Result<()>
pub fn register_listener(&self, callback: JsValue) -> Result<()>
sourcepub fn remove_listener(&self) -> Result<()>
pub fn remove_listener(&self) -> Result<()>
removeListenet
must be called when releasing ReflectorClient
to stop the background event processing task
pub async fn stop_notification_task(&self) -> Result<()>
Trait Implementations§
source§impl Clone for EventDispatcher
impl Clone for EventDispatcher
source§fn clone(&self) -> EventDispatcher
fn clone(&self) -> EventDispatcher
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Default for EventDispatcher
impl Default for EventDispatcher
source§impl From<EventDispatcher> for JsValue
impl From<EventDispatcher> for JsValue
source§fn from(value: EventDispatcher) -> Self
fn from(value: EventDispatcher) -> Self
Converts to this type from the input type.
source§impl FromWasmAbi for EventDispatcher
impl FromWasmAbi for EventDispatcher
source§impl IntoWasmAbi for EventDispatcher
impl IntoWasmAbi for EventDispatcher
source§impl LongRefFromWasmAbi for EventDispatcher
impl LongRefFromWasmAbi for EventDispatcher
source§impl OptionFromWasmAbi for EventDispatcher
impl OptionFromWasmAbi for EventDispatcher
source§impl OptionIntoWasmAbi for EventDispatcher
impl OptionIntoWasmAbi for EventDispatcher
source§impl RefFromWasmAbi for EventDispatcher
impl RefFromWasmAbi for EventDispatcher
§type Anchor = Ref<'static, EventDispatcher>
type Anchor = Ref<'static, EventDispatcher>
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 EventDispatcher
impl RefMutFromWasmAbi for EventDispatcher
source§impl TryFrom<JsValue> for EventDispatcher
impl TryFrom<JsValue> for EventDispatcher
Auto Trait Implementations§
impl RefUnwindSafe for EventDispatcher
impl Send for EventDispatcher
impl Sync for EventDispatcher
impl Unpin for EventDispatcher
impl UnwindSafe for EventDispatcher
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,
§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
.