Skip to main content

ReplaySafeDataset

Trait ReplaySafeDataset 

Source
pub trait ReplaySafeDataset: Dataset { }
Expand description

Promise that fetching an index again from fixed dataset contents is safe.

Implement this only when reads have no state changes that affect later samples and no external side effects that must happen exactly once. Wrap the dataset in crate::ReplaySafeMap to use this contract in an exact loader; LoaderState includes a complete example. Mutable/stateful datasets should use DatasetCheckpoint through crate::TransactionalMap instead.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<D> ReplaySafeDataset for Arc<D>

Implementors§