Struct iceberg_rust::spec::spec::manifest::ManifestWriter
source · pub struct ManifestWriter<'a, W>(/* private fields */)
where
W: Write;Expand description
A writer for manifest entries
Implementations§
source§impl<'a, W> ManifestWriter<'a, W>where
W: Write,
impl<'a, W> ManifestWriter<'a, W>where
W: Write,
pub fn new( writer: W, schema: &'a Schema, table_metadata: &TableMetadata, branch: Option<&str>, ) -> Result<ManifestWriter<'a, W>, Error>
pub fn into_inner(self) -> Result<W, Error>
Methods from Deref<Target = Writer<'a, W>>§
sourcepub fn append<T>(&mut self, value: T) -> Result<usize, Error>
pub fn append<T>(&mut self, value: T) -> Result<usize, Error>
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.
sourcepub fn append_value_ref(&mut self, value: &Value) -> Result<usize, Error>
pub fn append_value_ref(&mut self, value: &Value) -> Result<usize, Error>
Append a compatible value 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.
sourcepub fn append_ser<S>(&mut self, value: S) -> Result<usize, Error>where
S: Serialize,
pub fn append_ser<S>(&mut self, value: S) -> Result<usize, Error>where
S: Serialize,
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.
sourcepub fn extend<I, T>(&mut self, values: I) -> Result<usize, Error>
pub fn extend<I, T>(&mut self, values: I) -> Result<usize, Error>
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 forces the written data to be flushed (an implicit
call to flush is performed).
sourcepub fn extend_ser<I, T>(&mut self, values: I) -> Result<usize, Error>where
T: Serialize,
I: IntoIterator<Item = T>,
pub fn extend_ser<I, T>(&mut self, values: I) -> Result<usize, Error>where
T: Serialize,
I: IntoIterator<Item = T>,
sourcepub fn extend_from_slice(&mut self, values: &[Value]) -> Result<usize, Error>
pub fn extend_from_slice(&mut self, values: &[Value]) -> Result<usize, Error>
Extend a Writer by appending each Value from a slice, while also performing schema
validation on each value appended.
Return the number of bytes written.
NOTE This function forces the written data to be flushed (an implicit
call to flush is performed).
Trait Implementations§
source§impl<'a, W> Deref for ManifestWriter<'a, W>where
W: Write,
impl<'a, W> Deref for ManifestWriter<'a, W>where
W: Write,
Auto Trait Implementations§
impl<'a, W> Freeze for ManifestWriter<'a, W>where
W: Freeze,
impl<'a, W> RefUnwindSafe for ManifestWriter<'a, W>where
W: RefUnwindSafe,
impl<'a, W> Send for ManifestWriter<'a, W>where
W: Send,
impl<'a, W> Sync for ManifestWriter<'a, W>where
W: Sync,
impl<'a, W> Unpin for ManifestWriter<'a, W>where
W: Unpin,
impl<'a, W> UnwindSafe for ManifestWriter<'a, W>where
W: UnwindSafe,
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more