pub struct DatasetDescriptor { /* private fields */ }Expand description
O(1) metadata for one logical dataset.
Implementations§
Source§impl DatasetDescriptor
impl DatasetDescriptor
Sourcepub fn regular(
id: DatasetId,
payload: PayloadKind,
logical_rows: u64,
rows_per_chunk: u32,
first_chunk: ChunkId,
) -> Result<Self, ProviderError>
pub fn regular( id: DatasetId, payload: PayloadKind, logical_rows: u64, rows_per_chunk: u32, first_chunk: ChunkId, ) -> Result<Self, ProviderError>
Describes a regularly chunked logical dataset.
§Errors
Returns a typed error for zero chunk size or 64-bit arithmetic overflow.
Sourcepub fn source_defined(
id: DatasetId,
payload: PayloadKind,
logical_rows: u64,
chunk_count: u64,
first_chunk: ChunkId,
target_rows: u32,
) -> Result<Self, ProviderError>
pub fn source_defined( id: DatasetId, payload: PayloadKind, logical_rows: u64, chunk_count: u64, first_chunk: ChunkId, target_rows: u32, ) -> Result<Self, ProviderError>
Describes source-defined chunk boundaries without storing each boundary.
§Errors
Returns a typed error for contradictory counts, zero target size, or chunk-identity overflow.
Sourcepub const fn payload(self) -> PayloadKind
pub const fn payload(self) -> PayloadKind
Typed payload produced for this dataset.
Sourcepub const fn logical_rows(self) -> u64
pub const fn logical_rows(self) -> u64
Total logical rows, which may exceed u32::MAX.
Sourcepub const fn chunk_count(self) -> u64
pub const fn chunk_count(self) -> u64
Number of chunks, represented without a per-chunk vector.
Sourcepub const fn first_chunk(self) -> ChunkId
pub const fn first_chunk(self) -> ChunkId
First stable chunk identity.
Sourcepub const fn layout(self) -> ChunkLayout
pub const fn layout(self) -> ChunkLayout
Chunk-boundary policy.
Sourcepub fn regular_chunk(
self,
chunk: ChunkId,
) -> Result<ChunkDescriptor, ProviderError>
pub fn regular_chunk( self, chunk: ChunkId, ) -> Result<ChunkDescriptor, ProviderError>
Resolves a regular chunk in constant time.
§Errors
Returns ProviderError::UnknownChunk for a foreign chunk or when the
source owns its own boundaries.
Trait Implementations§
Source§impl Clone for DatasetDescriptor
impl Clone for DatasetDescriptor
impl Copy for DatasetDescriptor
Source§impl Debug for DatasetDescriptor
impl Debug for DatasetDescriptor
impl Eq for DatasetDescriptor
Source§impl PartialEq for DatasetDescriptor
impl PartialEq for DatasetDescriptor
impl StructuralPartialEq for DatasetDescriptor
Auto Trait Implementations§
impl Freeze for DatasetDescriptor
impl RefUnwindSafe for DatasetDescriptor
impl Send for DatasetDescriptor
impl Sync for DatasetDescriptor
impl Unpin for DatasetDescriptor
impl UnsafeUnpin for DatasetDescriptor
impl UnwindSafe for DatasetDescriptor
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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