pub struct FramedStream<T> { /* private fields */ }Expand description
Connected length-prefixed stream. Partial writes stay in WriteCursor.
Implementations§
Source§impl<T: StreamBytes> FramedStream<T>
impl<T: StreamBytes> FramedStream<T>
Sourcepub fn connect(
io: T,
local: ObservedLocator,
peer: ObservedLocator,
scope: ScopeEpoch,
mtu: u16,
) -> Result<Self, QdnfError>
pub fn connect( io: T, local: ObservedLocator, peer: ObservedLocator, scope: ScopeEpoch, mtu: u16, ) -> Result<Self, QdnfError>
Ready stream. mtu == 0 is Malformed; mtu above FRAME_CAP is Capacity.
Sourcepub fn capabilities(&self) -> BearerCapabilities
pub fn capabilities(&self) -> BearerCapabilities
Bearer capabilities. Ordered, no group delivery, no duplicates.
Sourcepub fn lifecycle(&self) -> &BearerLifecycle
pub fn lifecycle(&self) -> &BearerLifecycle
Lifecycle phase and MTU owner.
Sourcepub fn locator(&self) -> ObservedLocator
pub fn locator(&self) -> ObservedLocator
Local adapter locator.
Sourcepub fn peer(&self) -> ObservedLocator
pub fn peer(&self) -> ObservedLocator
Observed peer locator. Never taken from a payload field.
Sourcepub fn write_cursor(&self) -> &WriteCursor
pub fn write_cursor(&self) -> &WriteCursor
Pending write cursor (named-pipe / UDS flush sites).
Sourcepub fn read_cursor(&self) -> &ReadCursor
pub fn read_cursor(&self) -> &ReadCursor
Partial-read cursor.
Sourcepub fn begin_drain(&mut self) -> Result<(), QdnfError>
pub fn begin_drain(&mut self) -> Result<(), QdnfError>
Ready → Draining. New Bearer::send fails Closed; recv still drains.
Sourcepub fn drain_write(&mut self) -> Result<(), QdnfError>
pub fn drain_write(&mut self) -> Result<(), QdnfError>
Flush an already-sealed write. Does not accept a new frame.
Trait Implementations§
Source§impl<T: StreamBytes> Bearer for FramedStream<T>
impl<T: StreamBytes> Bearer for FramedStream<T>
Auto Trait Implementations§
impl<T> Freeze for FramedStream<T>where
T: Freeze,
impl<T> RefUnwindSafe for FramedStream<T>where
T: RefUnwindSafe,
impl<T> Send for FramedStream<T>where
T: Send,
impl<T> Sync for FramedStream<T>where
T: Sync,
impl<T> Unpin for FramedStream<T>where
T: Unpin,
impl<T> UnsafeUnpin for FramedStream<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for FramedStream<T>where
T: UnwindSafe,
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more