pub struct CodedOutputStream<'a> { /* private fields */ }
Expand description

Buffered write with handy utilities

Implementations

Construct from given Write.

CodedOutputStream is buffered even if Write is not

CodedOutputStream which writes directly to bytes.

Attempt to write more than bytes capacity results in error.

CodedOutputStream which writes directly to Vec<u8>.

Caller should call flush at the end to guarantee vec contains all written data.

Check if EOF is reached.

Panics

If underlying write has no EOF

Flush the buffer to underlying write

Write a byte

Write bytes

Write a tag

Write varint

Write varint

Write 32-bit integer little endian

Write 64-bit integer little endian

Write float

Write double

Write float field

Write double field

Write varint

Write varint

Write varint

Write varint

Write zigzag varint

Write zigzag varint

Write fixed64

Write fixed32

Write sfixed64

Write sfixed32

Write bool

Write enum

Write enum

Write unknown value

Write uint64 field

Write uint32 field

Write int64 field

Write int32 field

Write sint64 field

Write sint32 field

Write fixed64 field

Write fixed32 field

Write sfixed64 field

Write sfixed32 field

Write bool field

Write enum field

Write enum field

Write unknown field

Write unknown fields

Write bytes

Write string

Write message

Write bytes field

Write string field

Write message field

Trait Implementations

Write a buffer into this writer, returning how many bytes were written. Read more

Flush this output stream, ensuring that all intermediately buffered contents reach their destination. Read more

Like write, except that it writes from a slice of buffers. Read more

🔬 This is a nightly-only experimental API. (can_vector)

Determines if this Writer has an efficient write_vectored implementation. Read more

Attempts to write an entire buffer into this writer. Read more

🔬 This is a nightly-only experimental API. (write_all_vectored)

Attempts to write multiple buffers into this writer. Read more

Writes a formatted string into this writer, returning any error encountered. Read more

Creates a “by reference” adapter for this instance of Write. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

The archived version of the pointer metadata for this type.

Converts some archived metadata to the pointer metadata for itself.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Deserializes using the given deserializer

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The type for metadata in pointers and references to Self.

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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more