pub struct DatasetRecord { /* private fields */ }Expand description
Format-agnostic structured dataset row.
Implementations§
Source§impl DatasetRecord
impl DatasetRecord
Sourcepub fn from_fields<I, K>(fields: I) -> Self
pub fn from_fields<I, K>(fields: I) -> Self
Create a record from any iterator of named fields.
Sourcepub fn fields(&self) -> &BTreeMap<String, Value>
pub fn fields(&self) -> &BTreeMap<String, Value>
Borrow all record fields in deterministic key order.
Sourcepub fn into_fields(self) -> BTreeMap<String, Value>
pub fn into_fields(self) -> BTreeMap<String, Value>
Consume this record into its fields.
Trait Implementations§
Source§impl Clone for DatasetRecord
impl Clone for DatasetRecord
Source§fn clone(&self) -> DatasetRecord
fn clone(&self) -> DatasetRecord
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl DatasetItem for DatasetRecord
impl DatasetItem for DatasetRecord
Source§fn label(&self) -> Label
fn label(&self) -> Label
Classification label used to route and count the item. Defaults to
Label::Real.Source§fn source_offset(&self) -> Option<usize>
fn source_offset(&self) -> Option<usize>
Source-provided resume cursor observed after this item, if any.
Source§impl Debug for DatasetRecord
impl Debug for DatasetRecord
Source§impl ItemSink<DatasetRecord> for RecordSink
impl ItemSink<DatasetRecord> for RecordSink
Source§fn prepare<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = AppResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn prepare<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = AppResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Prepare the destination before any item is written (create directories, seed counters).
Source§impl PartialEq for DatasetRecord
impl PartialEq for DatasetRecord
Source§impl Source<DatasetRecord> for RecordSource
impl Source<DatasetRecord> for RecordSource
Source§fn stream(
self: Box<Self>,
_cancel: CancellationToken,
) -> BoxItemStream<DatasetRecord>
fn stream( self: Box<Self>, _cancel: CancellationToken, ) -> BoxItemStream<DatasetRecord>
Stream items from this source.
Source§fn display_name(&self) -> &str
fn display_name(&self) -> &str
Human-readable source label.
Source§fn set_resume_state(&mut self, _offset: usize, _already_fetched: usize)
fn set_resume_state(&mut self, _offset: usize, _already_fetched: usize)
Configure resume state before streaming.
impl StructuralPartialEq for DatasetRecord
Source§impl Validator<DatasetRecord> for SchemaValidator
impl Validator<DatasetRecord> for SchemaValidator
Auto Trait Implementations§
impl Freeze for DatasetRecord
impl RefUnwindSafe for DatasetRecord
impl Send for DatasetRecord
impl Sync for DatasetRecord
impl Unpin for DatasetRecord
impl UnsafeUnpin for DatasetRecord
impl UnwindSafe for DatasetRecord
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> 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