Struct avro_rs::Writer [] [src]

pub struct Writer<'a, W> { /* fields omitted */ }

Main interface for writing Avro formatted values.

Methods

impl<'a, W: Write> Writer<'a, W>
[src]

[src]

Creates a Writer given a Schema and something implementing the io::Write trait to write to. No compression Codec will be used.

[src]

Creates a Writer with a specific Codec given a Schema and something implementing the io::Write trait to write to.

[src]

Get a reference to the Schema associated to a Writer.

[src]

Append a compatible value (implementing the ToAvro trait) to a Writer, also performing schema validation.

Return the number of bytes written (it might be 0, see below).

NOTE This function is not guaranteed to perform any actual write, since it relies on internal buffering for performance reasons. If you want to be sure the value has been written, then call flush.

[src]

Append anything implementing the Serialize trait to a Writer for serde compatibility, also performing schema validation.

Return the number of bytes written.

NOTE This function is not guaranteed to perform any actual write, since it relies on internal buffering for performance reasons. If you want to be sure the value has been written, then call flush.

[src]

Extend a Writer with an Iterator of compatible values (implementing the ToAvro trait), also performing schema validation.

Return the number of bytes written.

NOTE This function is not guaranteed to perform any actual write, since it relies on internal buffering for performance reasons. If you want to be sure the value has been written, then call flush.

[src]

Extend a Writer with an Iterator of anything implementing the Serialize trait for serde compatibility, also performing schema validation.

Return the number of bytes written.

NOTE This function is not guaranteed to perform any actual write, since it relies on internal buffering for performance reasons. If you want to be sure the value has been written, then call flush.

[src]

Flush the content appended to a Writer. Call this function to make sure all the content has been written before releasing the Writer.

Return the number of bytes written.

[src]

Return what the Writer is writing to, consuming the Writer itself.

NOTE This function doesn't guarantee that everything gets written before consuming the buffer. Please call flush before.

Trait Implementations

Auto Trait Implementations

impl<'a, W> !Send for Writer<'a, W>

impl<'a, W> !Sync for Writer<'a, W>