pub struct PartialOctetRead {
pub data: Vec<u8>,
pub eom_reason: EomReason,
}Expand description
The transfer an octet read completed before it failed — C’s
*nbytesTransfered / *eomReason, which asynOctet::read writes out
even when it returns a failing asynStatus
(asynInterposeEos.c:242-253).
This owns the bytes rather than pointing at the caller’s buffer: it rides
inside crate::error::AsynError::PartialRead, so the data and the
status are one value and a ? on the read cannot deliver the failure
while dropping the bytes. Every dispatch hop between the interpose and a
record (port_actor → PortHandle → device support / SyncIO) hands the
error on by value, so the transfer arrives with it.
Fields§
§data: Vec<u8>The bytes transferred into the caller’s buffer before the failure.
eom_reason: EomReasonThe end-of-message reason accumulated up to the failure.
Implementations§
Source§impl PartialOctetRead
impl PartialOctetRead
Sourcepub fn nbytes_transferred(&self) -> usize
pub fn nbytes_transferred(&self) -> usize
C’s *nbytesTransfered for this failed read.
Trait Implementations§
Source§impl Clone for PartialOctetRead
impl Clone for PartialOctetRead
Source§fn clone(&self) -> PartialOctetRead
fn clone(&self) -> PartialOctetRead
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PartialOctetRead
impl Debug for PartialOctetRead
impl Eq for PartialOctetRead
Source§impl PartialEq for PartialOctetRead
impl PartialEq for PartialOctetRead
impl StructuralPartialEq for PartialOctetRead
Auto Trait Implementations§
impl Freeze for PartialOctetRead
impl RefUnwindSafe for PartialOctetRead
impl Send for PartialOctetRead
impl Sync for PartialOctetRead
impl Unpin for PartialOctetRead
impl UnsafeUnpin for PartialOctetRead
impl UnwindSafe for PartialOctetRead
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.