Struct weave::DeltaWriter
source · [−]pub struct DeltaWriter<'n> { /* private fields */ }
Expand description
A DeltaWriter is used to write a new delta. Data should be written to the writer, and then the
close
method called to update the weave file with the new delta.
Implementations
sourceimpl<'n> DeltaWriter<'n>
impl<'n> DeltaWriter<'n>
sourcepub fn new<'a, 'b, I>(
nc: &dyn NamingConvention,
tags: I,
base: usize
) -> Result<DeltaWriter<'_>> where
I: Iterator<Item = (&'a str, &'b str)>,
pub fn new<'a, 'b, I>(
nc: &dyn NamingConvention,
tags: I,
base: usize
) -> Result<DeltaWriter<'_>> where
I: Iterator<Item = (&'a str, &'b str)>,
Construct a writer for a new delta. The naming convention and the tags set where the names
will be written, and what tags will be associated with the convention. The base
is the
existing delta that the change should be based on.
pub fn close(self) -> Result<()>
Trait Implementations
sourceimpl<'n> Write for DeltaWriter<'n>
impl<'n> Write for DeltaWriter<'n>
sourcefn write(&mut self, buf: &[u8]) -> Result<usize>
fn write(&mut self, buf: &[u8]) -> Result<usize>
Write a buffer into this writer, returning how many bytes were written. Read more
sourcefn flush(&mut self) -> Result<()>
fn flush(&mut self) -> Result<()>
Flush this output stream, ensuring that all intermediately buffered contents reach their destination. Read more
sourcefn is_write_vectored(&self) -> bool
fn is_write_vectored(&self) -> bool
can_vector
)Determines if this Write
r has an efficient write_vectored
implementation. Read more
1.0.0 · sourcefn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
Attempts to write an entire buffer into this writer. Read more
sourcefn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
write_all_vectored
)Attempts to write multiple buffers into this writer. Read more
Auto Trait Implementations
impl<'n> !RefUnwindSafe for DeltaWriter<'n>
impl<'n> !Send for DeltaWriter<'n>
impl<'n> !Sync for DeltaWriter<'n>
impl<'n> Unpin for DeltaWriter<'n>
impl<'n> !UnwindSafe for DeltaWriter<'n>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more