pub struct JsIpcClient {
    pub client: Arc<IpcClient<NoEncryptionCryptoProvider, JsCommunicationBackend, RwLock<HashMap<Endpoint, ()>>>>,
}Expand description
JavaScript wrapper around the IPC client. For more information, see the IpcClient documentation.
Fields§
§client: Arc<IpcClient<NoEncryptionCryptoProvider, JsCommunicationBackend, RwLock<HashMap<Endpoint, ()>>>>The underlying IPC client instance. Use this to create WASM-compatible functions that interact with the IPC client, e.g. to register RPC handlers, trigger RPC requests, send typed messages, etc. For examples see wasm::ipc_register_discover_handler.
Implementations§
Source§impl JsIpcClient
 
impl JsIpcClient
pub fn new(communication_provider: &JsCommunicationBackend) -> JsIpcClient
pub async fn start(&self)
pub async fn is_running(&self) -> bool
pub async fn send(&self, message: OutgoingMessage) -> Result<(), JsError>
pub async fn subscribe(&self) -> Result<JsIpcClientSubscription, SubscribeError>
Trait Implementations§
Source§impl From<JsIpcClient> for JsValue
 
impl From<JsIpcClient> for JsValue
Source§fn from(value: JsIpcClient) -> Self
 
fn from(value: JsIpcClient) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for JsIpcClient
 
impl FromWasmAbi for JsIpcClient
Source§impl IntoWasmAbi for JsIpcClient
 
impl IntoWasmAbi for JsIpcClient
Source§impl LongRefFromWasmAbi for JsIpcClient
 
impl LongRefFromWasmAbi for JsIpcClient
Source§impl OptionFromWasmAbi for JsIpcClient
 
impl OptionFromWasmAbi for JsIpcClient
Source§impl OptionIntoWasmAbi for JsIpcClient
 
impl OptionIntoWasmAbi for JsIpcClient
Source§impl RefFromWasmAbi for JsIpcClient
 
impl RefFromWasmAbi for JsIpcClient
Source§type Anchor = RcRef<JsIpcClient>
 
type Anchor = RcRef<JsIpcClient>
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 JsIpcClient
 
impl RefMutFromWasmAbi for JsIpcClient
Source§impl TryFromJsValue for JsIpcClient
 
impl TryFromJsValue for JsIpcClient
Source§impl VectorFromWasmAbi for JsIpcClient
 
impl VectorFromWasmAbi for JsIpcClient
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[JsIpcClient]>
Source§impl VectorIntoJsValue for JsIpcClient
 
impl VectorIntoJsValue for JsIpcClient
fn vector_into_jsvalue(vector: Box<[JsIpcClient]>) -> JsValue
Source§impl VectorIntoWasmAbi for JsIpcClient
 
impl VectorIntoWasmAbi for JsIpcClient
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[JsIpcClient]>) -> Self::Abi
Source§impl WasmDescribe for JsIpcClient
 
impl WasmDescribe for JsIpcClient
Source§impl WasmDescribeVector for JsIpcClient
 
impl WasmDescribeVector for JsIpcClient
impl SupportsConstructor for JsIpcClient
impl SupportsInstanceProperty for JsIpcClient
impl SupportsStaticProperty for JsIpcClient
Auto Trait Implementations§
impl Freeze for JsIpcClient
impl !RefUnwindSafe for JsIpcClient
impl Send for JsIpcClient
impl Sync for JsIpcClient
impl Unpin for JsIpcClient
impl !UnwindSafe for JsIpcClient
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::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.