pub struct SampleState { /* private fields */ }Expand description
Shared sampling/counter state for one dataset side.
Implementations§
Source§impl SampleState
impl SampleState
pub fn new(cap: usize) -> Self
pub fn count(&self) -> u64
Sourcepub fn samples(&self) -> Vec<Value>
pub fn samples(&self) -> Vec<Value>
A copy of the sampled records (bounded by the construction-time cap).
Used by consumers that run their own schema inference over the sample —
e.g. the CLI’s Data Movement Catalog (#279), which feeds them to
faucet_core::schema::infer_schema for a drift-comparable shape.
Sourcepub fn inferred_schema(&self) -> InferredSchema
pub fn inferred_schema(&self) -> InferredSchema
Infer an ordered (name, OL-type) schema from the sampled records.
Auto Trait Implementations§
impl !Freeze for SampleState
impl RefUnwindSafe for SampleState
impl Send for SampleState
impl Sync for SampleState
impl Unpin for SampleState
impl UnsafeUnpin for SampleState
impl UnwindSafe for SampleState
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