pub struct StructureChunkProvider { /* private fields */ }Expand description
Zero-copy provider for structure chunks already present in one snapshot.
Implementations§
Source§impl StructureChunkProvider
impl StructureChunkProvider
Sourcepub fn new(
dataset: DatasetId,
first_chunk: ChunkId,
structure: Structure,
) -> Result<StructureChunkProvider, ProviderError>
pub fn new( dataset: DatasetId, first_chunk: ChunkId, structure: Structure, ) -> Result<StructureChunkProvider, ProviderError>
Creates a provider whose chunk namespace begins at first_chunk.
§Errors
Returns a typed error when chunk count or identity arithmetic overflows.
Sourcepub const fn dataset(&self) -> DatasetDescriptor
pub const fn dataset(&self) -> DatasetDescriptor
Compact dataset metadata.
Sourcepub fn chunk(&self, chunk: ChunkId) -> Result<StructureChunk, ProviderError>
pub fn chunk(&self, chunk: ChunkId) -> Result<StructureChunk, ProviderError>
Produces one shared structure payload in constant time.
§Errors
Rejects chunk identities outside this provider.
Trait Implementations§
Source§impl Clone for StructureChunkProvider
impl Clone for StructureChunkProvider
Source§fn clone(&self) -> StructureChunkProvider
fn clone(&self) -> StructureChunkProvider
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 moreAuto Trait Implementations§
impl Freeze for StructureChunkProvider
impl RefUnwindSafe for StructureChunkProvider
impl Send for StructureChunkProvider
impl Sync for StructureChunkProvider
impl Unpin for StructureChunkProvider
impl UnsafeUnpin for StructureChunkProvider
impl UnwindSafe for StructureChunkProvider
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<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