pub struct ScannSegmentPayload {
pub artifact_id: u64,
pub generation: u64,
pub dimension: u32,
pub encoding: ScannEncoding,
pub num_leaves: u32,
pub doc_count: u32,
/* private fields */
}Expand description
Segment-local leaf runs tied to one global trained artifact.
Fields§
§artifact_id: u64§generation: u64§dimension: u32§encoding: ScannEncoding§num_leaves: u32§doc_count: u32Implementations§
Source§impl ScannSegmentPayload
impl ScannSegmentPayload
pub fn new( artifact: &ScannTrainedArtifact, doc_count: u32, runs: Vec<ScannLeafRun>, ) -> ScannResult<Self>
Sourcepub fn from_generation(
config: &ScannConfig,
generation: u64,
artifact_id: u64,
doc_count: u32,
runs: Vec<ScannLeafRun>,
) -> ScannResult<Self>
pub fn from_generation( config: &ScannConfig, generation: u64, artifact_id: u64, doc_count: u32, runs: Vec<ScannLeafRun>, ) -> ScannResult<Self>
Construct from the already-validated generation header without decoding the global centroid plane into an owned artifact.
pub fn runs(&self) -> &[ScannLeafRun]
pub fn validate_against( &self, artifact: &ScannTrainedArtifact, ) -> ScannResult<()>
Sourcepub fn merge_contiguous(
segments: impl IntoIterator<Item = Self>,
) -> ScannResult<Self>
pub fn merge_contiguous( segments: impl IntoIterator<Item = Self>, ) -> ScannResult<Self>
Merge contiguous source segments by rebasing leaf-run document bases. Code, ordinal, and relative-document buffers are moved as-is; no vector is decoded, reassigned, or re-encoded and no codebook is retrained.
pub fn to_bytes(&self) -> ScannResult<Vec<u8>>
pub fn from_bytes(bytes: &[u8]) -> ScannResult<Self>
Trait Implementations§
Source§impl Clone for ScannSegmentPayload
impl Clone for ScannSegmentPayload
Source§impl Debug for ScannSegmentPayload
impl Debug for ScannSegmentPayload
impl Eq for ScannSegmentPayload
Source§impl PartialEq for ScannSegmentPayload
impl PartialEq for ScannSegmentPayload
impl StructuralPartialEq for ScannSegmentPayload
Auto Trait Implementations§
impl Freeze for ScannSegmentPayload
impl RefUnwindSafe for ScannSegmentPayload
impl Send for ScannSegmentPayload
impl Sync for ScannSegmentPayload
impl Unpin for ScannSegmentPayload
impl UnsafeUnpin for ScannSegmentPayload
impl UnwindSafe for ScannSegmentPayload
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DropFlavorWrapper<T> for T
impl<T> DropFlavorWrapper<T> for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
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