pub struct HeaderInfo(Arc<HeaderInfoInner>);Expand description
Header information for an Avro OCF file.
The header can be parsed once and shared to construct multiple readers for the same file, and so this struct is designed to be cheaply cloneable.
Tuple Fields§
§0: Arc<HeaderInfoInner>Implementations§
Source§impl HeaderInfo
impl HeaderInfo
pub(crate) fn new(header: Header, header_len: u64) -> Self
Sourcepub fn writer_schema(&self) -> Result<AvroSchema, AvroError>
pub fn writer_schema(&self) -> Result<AvroSchema, AvroError>
Returns the writer schema for this file.
Sourcepub fn compression(&self) -> Result<Option<CompressionCodec>, AvroError>
pub fn compression(&self) -> Result<Option<CompressionCodec>, AvroError>
Returns the CompressionCodec if any
Sourcepub fn header_len(&self) -> u64
pub fn header_len(&self) -> u64
Returns the length of the header in bytes.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HeaderInfo
impl RefUnwindSafe for HeaderInfo
impl Send for HeaderInfo
impl Sync for HeaderInfo
impl Unpin for HeaderInfo
impl UnsafeUnpin for HeaderInfo
impl UnwindSafe for HeaderInfo
Blanket Implementations§
impl<T> Allocation for T
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