pub struct StreamingQ42VolumeWriter { /* private fields */ }Expand description
Writes a sorted Q42 segment without retaining its compressed payload or per-block metadata in heap collections. Temporary streams are RAII-owned.
Implementations§
Source§impl StreamingQ42VolumeWriter
impl StreamingQ42VolumeWriter
Sourcepub fn new(lexicon: &HashMap<u64, String>) -> Result<Self>
pub fn new(lexicon: &HashMap<u64, String>) -> Result<Self>
Creates a default StreamingQ42VolumeWriter.
Sourcepub fn add_payload_catalogue_utf8(
&mut self,
payload_key: &str,
mime_type: &str,
language: Option<&str>,
role: &str,
utf8_body: &str,
) -> Result<PayloadCatalogueEntry>
pub fn add_payload_catalogue_utf8( &mut self, payload_key: &str, mime_type: &str, language: Option<&str>, role: &str, utf8_body: &str, ) -> Result<PayloadCatalogueEntry>
Append a UTF-8 prose/descriptor payload (ADR 0014) to the PCAT section of this volume.
Rejects media MIME types (image/*, audio/*, video/*, .p64, .10d).
Sourcepub fn set_payload_catalogue_blobs(
&mut self,
blobs: &[PayloadCatalogueBlob],
) -> Result<()>
pub fn set_payload_catalogue_blobs( &mut self, blobs: &[PayloadCatalogueBlob], ) -> Result<()>
Set the PCAT v1 payload catalogue from pre-constructed [PayloadCatalogueBlob] records.
Sourcepub fn set_payload_catalogue_entries(
&mut self,
entries: &[PayloadCatalogueEntry],
) -> Result<()>
pub fn set_payload_catalogue_entries( &mut self, entries: &[PayloadCatalogueEntry], ) -> Result<()>
Set the PCAT v1 payload catalogue from metadata-only PayloadCatalogueEntry descriptors.
Sourcepub fn declare_permissive_commons(&mut self)
pub fn declare_permissive_commons(&mut self)
Mark this segment as a Permissive Commons catalog. Ignored if any pushed Quin requires Sanctuary.
Sourcepub fn declare_sanctuary(&mut self)
pub fn declare_sanctuary(&mut self)
Mark this segment as Sanctuary / Selfhood. Public hash addressing is denied.
Sourcepub fn push_block(&mut self, seq_id: u64, quins: &[NQuin]) -> Result<()>
pub fn push_block(&mut self, seq_id: u64, quins: &[NQuin]) -> Result<()>
StreamingQ42VolumeWriter::push_block.
Sourcepub fn block_count(&self) -> u64
pub fn block_count(&self) -> u64
block count.
Sourcepub fn estimated_final_length(&self) -> Result<u64>
pub fn estimated_final_length(&self) -> Result<u64>
The exact final length if the writer were finished now. It includes the front matter and fixed BIDX/directory records, not just compressed data.
Sourcepub fn maximum_final_length_after_next_block(&self) -> Result<u64>
pub fn maximum_final_length_after_next_block(&self) -> Result<u64>
A safe upper bound for the final length after one additional block. It lets volume publishers split before a block crosses their byte cap without retaining compressed payloads.
Auto Trait Implementations§
impl Freeze for StreamingQ42VolumeWriter
impl RefUnwindSafe for StreamingQ42VolumeWriter
impl Send for StreamingQ42VolumeWriter
impl Sync for StreamingQ42VolumeWriter
impl Unpin for StreamingQ42VolumeWriter
impl UnsafeUnpin for StreamingQ42VolumeWriter
impl UnwindSafe for StreamingQ42VolumeWriter
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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