pub struct ContainerWriter<'a> {
pub file_id: [u8; 16],
pub externals: Vec<(String, &'a [u8])>,
}Expand description
Builds a new container: Head, the external chunks in the given order, SQLi, Foot, as CSP writes them.
Fields§
§file_id: [u8; 16]File id written into CHNKHead.
externals: Vec<(String, &'a [u8])>External chunks (id, payload), in file order.
Implementations§
Source§impl<'a> ContainerWriter<'a>
impl<'a> ContainerWriter<'a>
Sourcepub fn push_external(&mut self, id: impl Into<String>, payload: &'a [u8])
pub fn push_external(&mut self, id: impl Into<String>, payload: &'a [u8])
Appends an external chunk.
Sourcepub fn external_offsets(&self) -> Vec<(String, u64)>
pub fn external_offsets(&self) -> Vec<(String, u64)>
File offset of each external chunk header (the ExternalChunk.Offset
values). They come before the database, so they do not depend on it.
Trait Implementations§
Source§impl<'a> Clone for ContainerWriter<'a>
impl<'a> Clone for ContainerWriter<'a>
Auto Trait Implementations§
impl<'a> Freeze for ContainerWriter<'a>
impl<'a> RefUnwindSafe for ContainerWriter<'a>
impl<'a> Send for ContainerWriter<'a>
impl<'a> Sync for ContainerWriter<'a>
impl<'a> Unpin for ContainerWriter<'a>
impl<'a> UnsafeUnpin for ContainerWriter<'a>
impl<'a> UnwindSafe for ContainerWriter<'a>
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