[][src]Struct pea2pea::connections::ConnectionWriter

pub struct ConnectionWriter {
    pub span: Span,
    pub addr: SocketAddr,
    pub buffer: Box<[u8]>,
    pub carry: usize,
    pub writer: OwnedWriteHalf,
}

An object dedicated to performing writes to a connection's stream; it is available only if the Writing protocol is enabled.

Fields

span: Span

The tracing span of the owning Node.

addr: SocketAddr

The address of the connection.

buffer: Box<[u8]>

A buffer dedicated to buffering writes to the stream.

carry: usize

The number of bytes from an incomplete write carried over in the buffer.

writer: OwnedWriteHalf

The write half of the stream.

Implementations

impl ConnectionWriter[src]

pub async fn write_all(&mut self, buffer: &[u8]) -> Result<()>[src]

Writes the given buffer to the stream.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.