pub struct ObjectStoreShardSource { /* private fields */ }Expand description
A CorpusRowSource streaming v1 shards out of an ObjectStore with a
bounded prefetch window. See the module docs for the determinism and
residency contracts.
Implementations§
Source§impl ObjectStoreShardSource
impl ObjectStoreShardSource
Sourcepub fn open(store: Arc<dyn ObjectStore>) -> Result<Self, ShardError>
pub fn open(store: Arc<dyn ObjectStore>) -> Result<Self, ShardError>
Open a source over every shard the store lists. Headers are probed with
32-byte range reads so total_rows / width are known up front without
fetching any payload.
Trait Implementations§
Source§impl CorpusRowSource for ObjectStoreShardSource
impl CorpusRowSource for ObjectStoreShardSource
Source§fn total_rows(&self) -> u64
fn total_rows(&self) -> u64
Total rows across every shard in this source.
Source§fn batch_rows(&self) -> usize
fn batch_rows(&self) -> usize
Rows handed back per
next_batch (may be smaller for the final batch).Source§fn next_batch(&mut self) -> Result<Option<RowBatch>, ShardError>
fn next_batch(&mut self) -> Result<Option<RowBatch>, ShardError>
Yield the next deterministic batch, or
Ok(None) at end of corpus.Auto Trait Implementations§
impl !RefUnwindSafe for ObjectStoreShardSource
impl !UnwindSafe for ObjectStoreShardSource
impl Freeze for ObjectStoreShardSource
impl Send for ObjectStoreShardSource
impl Sync for ObjectStoreShardSource
impl Unpin for ObjectStoreShardSource
impl UnsafeUnpin for ObjectStoreShardSource
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> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T, U> Imply<T> for U
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.