Struct heph::net::LimitedBytes[][src]

pub struct LimitedBytes<B> { /* fields omitted */ }
Expand description

Wrapper to limit the number of bytes B can use.

See Bytes::limit and BytesVectored::limit.

Implementations

Returns the underlying buffer.

Trait Implementations

Returns itself as a slice of bytes that may or may not be initialised. Read more

Returns the length of the buffer as returned by as_bytes. Read more

Returns true if the buffer has spare capacity.

Update the length of the byte slice, marking n bytes as initialised. Read more

Wrap the buffer in LimitedBytes, which limits the amount of bytes used to limit. Read more

Type used as slice of buffers, usually this is an array.

Returns itself as a slice of MaybeUninitSlice.

Returns the total length of the buffers as returned by as_bufs. Read more

Returns true if (one of) the buffers has spare capacity.

Update the length of the buffers in the slice. Read more

Wrap the buffer in LimitedBytes, which limits the amount of bytes used to limit. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.