pub struct IpcTarget { /* private fields */ }Expand description
A handle to an IPC peer context (a window or the global object), wrapping the underlying JavaScript value that messages are dispatched to.
Implementations§
Trait Implementations§
Source§impl IpcDispatch for IpcTarget
impl IpcDispatch for IpcTarget
Source§fn as_target(&self) -> IpcTarget
fn as_target(&self) -> IpcTarget
Returns the
IpcTarget that messages dispatched through this peer
should be delivered to.Source§fn notify<'life0, 'async_trait, Ops, Msg>(
&'life0 self,
op: Ops,
payload: Msg,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Ops: OpsT + 'async_trait,
Msg: BorshSerialize + Send + Sync + 'static + 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn notify<'life0, 'async_trait, Ops, Msg>(
&'life0 self,
op: Ops,
payload: Msg,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Ops: OpsT + 'async_trait,
Msg: BorshSerialize + Send + Sync + 'static + 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait,
Sends a one-way notification carrying
op and a Borsh-serialized
payload to the target context, without awaiting a response.Source§fn call<'life0, 'async_trait, Ops, Req, Resp>(
&'life0 self,
op: Ops,
req: Req,
) -> Pin<Box<dyn Future<Output = Result<Resp>> + Send + 'async_trait>>
fn call<'life0, 'async_trait, Ops, Req, Resp>( &'life0 self, op: Ops, req: Req, ) -> Pin<Box<dyn Future<Output = Result<Resp>> + Send + 'async_trait>>
Issues a request/response call carrying
op and req, awaiting and
deserializing the response. Uses the registered local IPC object as the
reply source.impl Send for IpcTarget
impl Sync for IpcTarget
Auto Trait Implementations§
impl Freeze for IpcTarget
impl RefUnwindSafe for IpcTarget
impl Unpin for IpcTarget
impl UnsafeUnpin for IpcTarget
impl UnwindSafe for IpcTarget
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