pub struct RelayCellDecoderResult { /* private fields */ }Expand description
Result of calling RelayCellDecoder::decode.
Implementations§
source§impl RelayCellDecoderResult
impl RelayCellDecoderResult
sourcepub fn cmds(&self) -> impl Iterator<Item = RelayCmd> + '_
pub fn cmds(&self) -> impl Iterator<Item = RelayCmd> + '_
Returns a non-empty iterator over commands in relay messages that the cell producing this result contained any part of. i.e. this includes the command of “head”, “middle”, and/or “tail” message fragments that were in the cell.
sourcepub fn into_parts(
self,
) -> (impl Iterator<Item = UnparsedRelayMsg>, Option<IncompleteRelayMsgInfo>)
pub fn into_parts( self, ) -> (impl Iterator<Item = UnparsedRelayMsg>, Option<IncompleteRelayMsgInfo>)
Converts self to an iterator over the complete messages, and metadata
about the trailing incomplete message (as for Self::incomplete_info),
if any.
sourcepub fn incomplete_info(&self) -> Option<IncompleteRelayMsgInfo>
pub fn incomplete_info(&self) -> Option<IncompleteRelayMsgInfo>
Returns the IncompleteRelayMsgInfo describing the incomplete
relay message that this cell contained a fragment of, if any.
Note that:
- This does not describe a fragment that includes the end of the relay message, since the message is then complete.
- This does include a fragment that continues, but does not complete, a message started in an earlier relay cell.
- There is at most one such incomplete relay message, since no current relay cell format supports starting a new message before completing the previous one.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RelayCellDecoderResult
impl RefUnwindSafe for RelayCellDecoderResult
impl Send for RelayCellDecoderResult
impl Sync for RelayCellDecoderResult
impl Unpin for RelayCellDecoderResult
impl UnwindSafe for RelayCellDecoderResult
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
Mutably borrows from an owned value. Read more
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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