[−][src]Trait fizyr_rpc::transport::TransportWriteHalf
Trait for transport types that you can write message to.
Associated Types
Loading content...Required methods
fn poll_write_msg(
self: Pin<&mut Self>,
context: &mut Context<'_>,
header: &MessageHeader,
body: &Self::Body
) -> Poll<Result<(), WriteMessageError>>
[src]
self: Pin<&mut Self>,
context: &mut Context<'_>,
header: &MessageHeader,
body: &Self::Body
) -> Poll<Result<(), WriteMessageError>>
Try to write a message to the transport without blocking.
This function may write only part of the message. The next invocation will skip the already written bytes.
It is an error to change the value of the header
and body
parameters between invocations
as long as the function returns Poll::Pending
.
An implementation may write spliced messages over the transport if you do.
It is allowed to move the header and body in between invocations though,
as long as the values remain the same.
If the function returns Poll::Pending
,
the current task is scheduled to wake when the transport is ready for more data.
Provided methods
fn write_msg<'c>(
&'c mut self,
header: &'c MessageHeader,
body: &'c Self::Body
) -> WriteMsg<'_, Self>ⓘNotable traits for WriteMsg<'_, T>
impl<T: ?Sized> Future for WriteMsg<'_, T> where
T: TransportWriteHalf + Unpin, type Output = Result<(), WriteMessageError>;
[src]
&'c mut self,
header: &'c MessageHeader,
body: &'c Self::Body
) -> WriteMsg<'_, Self>ⓘ
Notable traits for WriteMsg<'_, T>
impl<T: ?Sized> Future for WriteMsg<'_, T> where
T: TransportWriteHalf + Unpin, type Output = Result<(), WriteMessageError>;
Asynchronously write a message to the transport.
Implementations on Foreign Types
impl<T: ?Sized> TransportWriteHalf for &mut T where
T: TransportWriteHalf + Unpin,
[src]
T: TransportWriteHalf + Unpin,
type Body = T::Body
fn poll_write_msg(
mut self: Pin<&mut Self>,
context: &mut Context<'_>,
header: &MessageHeader,
body: &Self::Body
) -> Poll<Result<(), WriteMessageError>>
[src]
mut self: Pin<&mut Self>,
context: &mut Context<'_>,
header: &MessageHeader,
body: &Self::Body
) -> Poll<Result<(), WriteMessageError>>
impl<T: ?Sized> TransportWriteHalf for Box<T> where
T: TransportWriteHalf + Unpin,
[src]
T: TransportWriteHalf + Unpin,
type Body = T::Body
fn poll_write_msg(
mut self: Pin<&mut Self>,
context: &mut Context<'_>,
header: &MessageHeader,
body: &Self::Body
) -> Poll<Result<(), WriteMessageError>>
[src]
mut self: Pin<&mut Self>,
context: &mut Context<'_>,
header: &MessageHeader,
body: &Self::Body
) -> Poll<Result<(), WriteMessageError>>
impl<P> TransportWriteHalf for Pin<P> where
P: DerefMut + Send + Unpin,
P::Target: TransportWriteHalf,
[src]
P: DerefMut + Send + Unpin,
P::Target: TransportWriteHalf,
type Body = <P::Target as TransportWriteHalf>::Body
fn poll_write_msg(
self: Pin<&mut Self>,
context: &mut Context<'_>,
header: &MessageHeader,
body: &Self::Body
) -> Poll<Result<(), WriteMessageError>>
[src]
self: Pin<&mut Self>,
context: &mut Context<'_>,
header: &MessageHeader,
body: &Self::Body
) -> Poll<Result<(), WriteMessageError>>