pub struct ByteStream {
pub peer_id: EndpointId,
pub send: SendStream,
pub recv: RecvStream,
/* private fields */
}Expand description
A raw bidirectional byte stream to a peer, running over a dedicated connection on an auxiliary ALPN.
Returned by NetworkEngine::open_stream (outgoing) and by
StreamAcceptor::accept (incoming). Both sides passed the regular
network handshake, so the peer is authenticated and belongs to the same
network and schema. The connection behind the stream closes when both
halves are dropped.
Fields§
§peer_id: EndpointIdThe authenticated peer on the other side of the stream.
send: SendStreamThe sending half of the stream.
recv: RecvStreamThe receiving half of the stream.
Implementations§
Source§impl ByteStream
impl ByteStream
Sourcepub fn connection_stats(&self) -> ByteStreamConnectionStats
pub fn connection_stats(&self) -> ByteStreamConnectionStats
Returns a point-in-time snapshot of the underlying Iroh connection.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ByteStream
impl RefUnwindSafe for ByteStream
impl Send for ByteStream
impl Sync for ByteStream
impl Unpin for ByteStream
impl UnsafeUnpin for ByteStream
impl UnwindSafe for ByteStream
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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