pub struct LocalBlobSink { /* private fields */ }Expand description
Local filesystem sink for DataItem samples.
Writes real samples to <output>/real and AI-generated samples to <output>/ai, naming files
by a shared, monotonically increasing counter that resumes past any files already on disk.
Implementations§
Source§impl LocalBlobSink
impl LocalBlobSink
Sourcepub fn new(output_dir: &Path, limits: DatasetLimits) -> Self
pub fn new(output_dir: &Path, limits: DatasetLimits) -> Self
Create a sink rooted at output_dir, writing into its real/ and ai/ subdirectories.
Trait Implementations§
Source§impl ItemSink<DataItem> for LocalBlobSink
impl ItemSink<DataItem> for LocalBlobSink
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).
Auto Trait Implementations§
impl !Freeze for LocalBlobSink
impl RefUnwindSafe for LocalBlobSink
impl Send for LocalBlobSink
impl Sync for LocalBlobSink
impl Unpin for LocalBlobSink
impl UnsafeUnpin for LocalBlobSink
impl UnwindSafe for LocalBlobSink
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> 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