Struct fizyr_rpc::PeerWriteHandle [−][src]
pub struct PeerWriteHandle<Body> { /* fields omitted */ }
Expand description
Handle to send messages to a peer.
The write handle can be used to send requests and stream messages.
When all read and write handles are dropped, the peer loop is stopped. Any open requests will also be terminated.
Implementations
pub async fn send_request(
&self,
service_id: i32,
body: impl Into<Body>
) -> Result<SentRequestHandle<Body>, Error>
pub async fn send_request(
&self,
service_id: i32,
body: impl Into<Body>
) -> Result<SentRequestHandle<Body>, Error>
Send a new request to the remote peer.
Send a stream message to the remote peer.
Make a close handle for the peer.
The close handle can be used to close the connection with the remote peer. It can be cloned and moved around independently.
Trait Implementations
Auto Trait Implementations
impl<Body> !RefUnwindSafe for PeerWriteHandle<Body>
impl<Body> Send for PeerWriteHandle<Body> where
Body: Send,
impl<Body> Sync for PeerWriteHandle<Body> where
Body: Send,
impl<Body> Unpin for PeerWriteHandle<Body>
impl<Body> !UnwindSafe for PeerWriteHandle<Body>
Blanket Implementations
Mutably borrows from an owned value. Read more