Struct workflow_wasm::channel::MultiplexerClient
source · pub struct MultiplexerClient { /* private fields */ }
Expand description
MultiplexerClient
is an object meant to be used in WASM environment to
process channel events.
Implementations§
source§impl MultiplexerClient
impl MultiplexerClient
pub async fn start_notification_task<T>( &self, multiplexer: &Multiplexer<T> ) -> Result<()>where T: Clone + Serialize + Send + Sync + 'static,
source§impl MultiplexerClient
impl MultiplexerClient
pub fn new() -> MultiplexerClient
pub fn handler(&self) -> JsValue
pub fn set_handler(&self, callback: JsValue) -> Result<()>
sourcepub fn remove_handler(&self) -> Result<()>
pub fn remove_handler(&self) -> Result<()>
removeHandler
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 MultiplexerClient
impl Clone for MultiplexerClient
source§fn clone(&self) -> MultiplexerClient
fn clone(&self) -> MultiplexerClient
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 MultiplexerClient
impl Default for MultiplexerClient
source§impl From<MultiplexerClient> for JsValue
impl From<MultiplexerClient> for JsValue
source§fn from(value: MultiplexerClient) -> Self
fn from(value: MultiplexerClient) -> Self
Converts to this type from the input type.
source§impl FromWasmAbi for MultiplexerClient
impl FromWasmAbi for MultiplexerClient
source§impl IntoWasmAbi for MultiplexerClient
impl IntoWasmAbi for MultiplexerClient
source§impl RefFromWasmAbi for MultiplexerClient
impl RefFromWasmAbi for MultiplexerClient
§type Anchor = Ref<'static, MultiplexerClient>
type Anchor = Ref<'static, MultiplexerClient>
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.Auto Trait Implementations§
impl RefUnwindSafe for MultiplexerClient
impl Send for MultiplexerClient
impl Sync for MultiplexerClient
impl Unpin for MultiplexerClient
impl UnwindSafe for MultiplexerClient
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
.