pub struct RecordSet {
pub source: String,
pub format: String,
pub columns: Vec<Column>,
}Expand description
A normalized corpus: named columns of equal length, plus provenance about where it came from. This is the universal input to every detector.
Fields§
§source: StringLogical source identifier (path, URL, or "-" for stdin).
format: StringThe format the normalizer recognized (e.g. "csv", "ndjson").
columns: Vec<Column>Implementations§
Source§impl RecordSet
impl RecordSet
Sourcepub fn new(
source: impl Into<String>,
format: impl Into<String>,
columns: Vec<Column>,
) -> Self
pub fn new( source: impl Into<String>, format: impl Into<String>, columns: Vec<Column>, ) -> Self
Creates a record set, panicking only via debug-assert if columns are ragged. Construction is the normalizer’s responsibility; detectors may rely on rectangularity.
pub fn width(&self) -> usize
pub fn column(&self, name: &str) -> Option<&Column>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RecordSet
impl<'de> Deserialize<'de> for RecordSet
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for RecordSet
impl RefUnwindSafe for RecordSet
impl Send for RecordSet
impl Sync for RecordSet
impl Unpin for RecordSet
impl UnsafeUnpin for RecordSet
impl UnwindSafe for RecordSet
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