pub struct TemplateCollector { /* private fields */ }Expand description
Thread-safe encode-side sink for the schema templates a v2 build produces.
The encoder records each layer’s stripped schema prefix
and embeds the returned hash in the frame; PackWriter::finalize snapshots
the collector into the manifest’s schemas table. Content-addressed keys
make the result independent of encode parallelism/order (design ★F1/E1):
two tiles sharing a schema record the same entry, and the snapshot is
sorted by hash.
Implementations§
Source§impl TemplateCollector
impl TemplateCollector
Sourcepub fn record(&self, template: &[u8]) -> [u8; 16]
pub fn record(&self, template: &[u8]) -> [u8; 16]
Record a template’s bytes (idempotent), returning its blake3-128 hash — the 16-byte reference the v2 frame carries.
Trait Implementations§
Source§impl Debug for TemplateCollector
impl Debug for TemplateCollector
Source§impl Default for TemplateCollector
impl Default for TemplateCollector
Source§fn default() -> TemplateCollector
fn default() -> TemplateCollector
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for TemplateCollector
impl RefUnwindSafe for TemplateCollector
impl Send for TemplateCollector
impl Sync for TemplateCollector
impl Unpin for TemplateCollector
impl UnsafeUnpin for TemplateCollector
impl UnwindSafe for TemplateCollector
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>
Converts
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>
Converts
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