Struct holochain_websocket::WebsocketSender
source · pub struct WebsocketSender(/* private fields */);
Expand description
Send requests and signals to the remote end of this websocket connection. Note, this receiver side must be polled (recv()) for responses to requests made on this sender to be received.
Implementations§
source§impl WebsocketSender
impl WebsocketSender
sourcepub async fn request<S, R>(&self, s: S) -> Result<R>where
S: Debug,
SerializedBytes: TryFrom<S, Error = SerializedBytesError>,
R: DeserializeOwned + Debug,
pub async fn request<S, R>(&self, s: S) -> Result<R>where
S: Debug,
SerializedBytes: TryFrom<S, Error = SerializedBytesError>,
R: DeserializeOwned + Debug,
Make a request of the remote using the default configured timeout. Note, this receiver side must be polled (recv()) for responses to requests made on this sender to be received.
sourcepub async fn request_timeout<S, R>(&self, s: S, timeout: Duration) -> Result<R>where
S: Debug,
SerializedBytes: TryFrom<S, Error = SerializedBytesError>,
R: DeserializeOwned + Debug,
pub async fn request_timeout<S, R>(&self, s: S, timeout: Duration) -> Result<R>where
S: Debug,
SerializedBytes: TryFrom<S, Error = SerializedBytesError>,
R: DeserializeOwned + Debug,
Make a request of the remote.
sourcepub async fn signal<S>(&self, s: S) -> Result<()>
pub async fn signal<S>(&self, s: S) -> Result<()>
Send a signal to the remote using the default configured timeout.
sourcepub async fn signal_timeout<S>(&self, s: S, timeout: Duration) -> Result<()>
pub async fn signal_timeout<S>(&self, s: S, timeout: Duration) -> Result<()>
Send a signal to the remote.
Trait Implementations§
source§impl Clone for WebsocketSender
impl Clone for WebsocketSender
source§fn clone(&self) -> WebsocketSender
fn clone(&self) -> WebsocketSender
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 moreAuto Trait Implementations§
impl RefUnwindSafe for WebsocketSender
impl Send for WebsocketSender
impl Sync for WebsocketSender
impl Unpin for WebsocketSender
impl UnwindSafe for WebsocketSender
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