pub struct Split<R: SplitRole> { /* private fields */ }Expand description
A validated split of one role.
Every field is private and there is no public constructor.
Implementations§
Source§impl<R: SplitRole> Split<R>
impl<R: SplitRole> Split<R>
Sourcepub fn rows(&self) -> &[LabeledExample]
pub fn rows(&self) -> &[LabeledExample]
The validated rows, in ingest order.
Sourcepub fn source_hash(&self) -> &[u8; 32]
pub fn source_hash(&self) -> &[u8; 32]
SHA-256 of this split’s canonical JSONL bytes.
Sourcepub fn exact_hash_of(&self, id: &str) -> Option<&[u8; 32]>
pub fn exact_hash_of(&self, id: &str) -> Option<&[u8; 32]>
The exact content hash of a row, computed once at construction.
Sourcepub fn normalized_hash_of(&self, id: &str) -> Option<&[u8; 32]>
pub fn normalized_hash_of(&self, id: &str) -> Option<&[u8; 32]>
The normalized content hash of a row, computed once at construction.
Sourcepub fn class_counts(&self) -> &[u64]
pub fn class_counts(&self) -> &[u64]
Observed per-class row counts, indexed by class label.
Trait Implementations§
impl<R: Eq + SplitRole> Eq for Split<R>
impl<R: PartialEq + SplitRole> StructuralPartialEq for Split<R>
Auto Trait Implementations§
impl<R> Freeze for Split<R>where
PhantomData<R>: Freeze,
impl<R> RefUnwindSafe for Split<R>where
PhantomData<R>: RefUnwindSafe,
impl<R> Send for Split<R>where
PhantomData<R>: Send,
impl<R> Sync for Split<R>where
PhantomData<R>: Sync,
impl<R> Unpin for Split<R>where
PhantomData<R>: Unpin,
impl<R> UnsafeUnpin for Split<R>where
PhantomData<R>: UnsafeUnpin,
impl<R> UnwindSafe for Split<R>where
PhantomData<R>: UnwindSafe,
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