pub struct StreamShapePlanner {
layout: ParquetLayout,
prior: Option<PriorShapes>,
retained_bytes: usize,
template_budget: usize,
vertex_offset: u32,
index_offset: u32,
}Expand description
The running state behind a streamed model’s whole-stream offsets.
Fields§
§layout: ParquetLayout§prior: Option<PriorShapes>None: every mesh emits its own block, as the stream always did.
Some: cross-batch sharing, against every shape emitted so far.
retained_bytes: usizeRaw buffer bytes held by prior’s retained templates, and their cap.
template_budget: usize§vertex_offset: u32§index_offset: u32Implementations§
Source§impl StreamShapePlanner
impl StreamShapePlanner
Sourcepub fn new(layout: ParquetLayout, stream_shapes: StreamShapes) -> Self
pub fn new(layout: ParquetLayout, stream_shapes: StreamShapes) -> Self
A planner for layout. Sharing needs BOTH the shared-shapes layout and
the client’s cross-batch opt-in; the route rejects the opt-in on the
flat layout, so ignoring it here is never what a caller sees.
Sourcepub fn plan(
&mut self,
meshes: &[MeshData],
baked_basis: Option<&[f64; 16]>,
) -> Result<PlannedBatch, ParquetError>
pub fn plan( &mut self, meshes: &[MeshData], baked_basis: Option<&[f64; 16]>, ) -> Result<PlannedBatch, ParquetError>
Plan the next batch and advance the whole-stream offsets past the
shapes it emits. Fails loud, advancing nothing, when an offset would
overflow the mesh table’s u32 columns: wrapping would decode as
garbage, not as an error.
baked_basis is the row-major native_to_baked of the frame the
batch’s vertices are in (StreamEvent::Batch::baked_basis); ignored
unless the planner shares.
Auto Trait Implementations§
impl Freeze for StreamShapePlanner
impl RefUnwindSafe for StreamShapePlanner
impl Send for StreamShapePlanner
impl Sync for StreamShapePlanner
impl Unpin for StreamShapePlanner
impl UnwindSafe for StreamShapePlanner
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read moreSource§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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.