Struct apache_avro::GenericSingleObjectWriter
source · pub struct GenericSingleObjectWriter { /* private fields */ }
Expand description
Writer that encodes messages according to the single object encoding v1 spec Uses an API similar to the current File Writer Writes all object bytes at once, and drains internal buffer
Implementations§
source§impl GenericSingleObjectWriter
impl GenericSingleObjectWriter
pub fn new_with_capacity( schema: &Schema, initial_buffer_cap: usize ) -> AvroResult<GenericSingleObjectWriter>
sourcepub fn write_value_ref<W: Write>(
&mut self,
v: &Value,
writer: &mut W
) -> AvroResult<usize>
pub fn write_value_ref<W: Write>( &mut self, v: &Value, writer: &mut W ) -> AvroResult<usize>
Write the referenced Value to the provided Write object. Returns a result with the number of bytes written including the header
sourcepub fn write_value<W: Write>(
&mut self,
v: Value,
writer: &mut W
) -> AvroResult<usize>
pub fn write_value<W: Write>( &mut self, v: Value, writer: &mut W ) -> AvroResult<usize>
Write the Value to the provided Write object. Returns a result with the number of bytes written including the header
Auto Trait Implementations§
impl RefUnwindSafe for GenericSingleObjectWriter
impl Send for GenericSingleObjectWriter
impl Sync for GenericSingleObjectWriter
impl Unpin for GenericSingleObjectWriter
impl UnwindSafe for GenericSingleObjectWriter
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