Struct dbn::encode::dbn::MetadataEncoder
source · pub struct MetadataEncoder<W>where
W: Write,{ /* private fields */ }Expand description
Type for encoding Metadata into Databento Binary Encoding (DBN).
Implementations§
source§impl<W> MetadataEncoder<W>where
W: Write,
impl<W> MetadataEncoder<W>where W: Write,
sourcepub const MIN_ENCODED_SIZE: usize = 128usize
pub const MIN_ENCODED_SIZE: usize = 128usize
The minimum size in bytes of encoded metadata.
sourcepub const START_OFFSET: usize = 26usize
pub const START_OFFSET: usize = 26usize
The offset of start in encoded metadata.
sourcepub fn new(writer: W) -> Self
pub fn new(writer: W) -> Self
Creates a new MetadataEncoder that will write to writer.
source§impl<W> MetadataEncoder<W>where
W: Write + Seek,
impl<W> MetadataEncoder<W>where W: Write + Seek,
sourcepub fn update_encoded(
&mut self,
start: u64,
end: Option<NonZeroU64>,
limit: Option<NonZeroU64>
) -> Result<()>
pub fn update_encoded( &mut self, start: u64, end: Option<NonZeroU64>, limit: Option<NonZeroU64> ) -> Result<()>
Updates the given metadata properties in an existing DBN buffer.
Errors
This function returns an error if it’s unable to seek to the position to update the metadata or it fails to write to the underlying writer.