Struct distant_core::TransportReadHalf
source · [−]Expand description
Represents a transport of data in from the network
Implementations
sourceimpl<T, U> TransportReadHalf<T, U> where
T: AsyncRead + Unpin,
U: Codec,
impl<T, U> TransportReadHalf<T, U> where
T: AsyncRead + Unpin,
U: Codec,
sourcepub async fn receive<R: DeserializeOwned>(
&mut self
) -> Result<Option<R>, TransportError>
pub async fn receive<R: DeserializeOwned>(
&mut self
) -> Result<Option<R>, TransportError>
Receives some data from out on the wire, waiting until it’s available, returning none if the transport is now closed
Auto Trait Implementations
impl<T, U> RefUnwindSafe for TransportReadHalf<T, U> where
T: RefUnwindSafe,
U: RefUnwindSafe,
impl<T, U> Send for TransportReadHalf<T, U> where
T: Send,
U: Send,
impl<T, U> Sync for TransportReadHalf<T, U> where
T: Sync,
U: Sync,
impl<T, U> Unpin for TransportReadHalf<T, U>
impl<T, U> UnwindSafe for TransportReadHalf<T, U> where
T: UnwindSafe,
U: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more