#[non_exhaustive]pub enum AccessPattern {
Sequential,
BoundedBacktrack {
window_bytes: u64,
},
RandomAccess,
}Expand description
How a decoder reads its input, declared so drivers can size a buffer or choose a fetch strategy for unseekable streams.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Sequential
Reads move forward; any backtrack is incidental and tiny.
BoundedBacktrack
Reads may revisit at most window_bytes behind the furthest read.
RandomAccess
Reads may target any offset at any time (directories, tile tables, trailing indexes).
Implementations§
Source§impl AccessPattern
impl AccessPattern
Sourcepub const fn most_demanding(self, other: AccessPattern) -> AccessPattern
pub const fn most_demanding(self, other: AccessPattern) -> AccessPattern
The more demanding of two patterns (RandomAccess over
BoundedBacktrack over Sequential; the larger window between two
bounded ones).
Trait Implementations§
Source§impl Clone for AccessPattern
impl Clone for AccessPattern
Source§fn clone(&self) -> AccessPattern
fn clone(&self) -> AccessPattern
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 moreimpl Copy for AccessPattern
Source§impl Debug for AccessPattern
impl Debug for AccessPattern
Source§impl Default for AccessPattern
impl Default for AccessPattern
Source§fn default() -> AccessPattern
fn default() -> AccessPattern
Returns the “default value” for a type. Read more
impl Eq for AccessPattern
Source§impl Hash for AccessPattern
impl Hash for AccessPattern
Source§impl PartialEq for AccessPattern
impl PartialEq for AccessPattern
impl StructuralPartialEq for AccessPattern
Auto Trait Implementations§
impl Freeze for AccessPattern
impl RefUnwindSafe for AccessPattern
impl Send for AccessPattern
impl Sync for AccessPattern
impl Unpin for AccessPattern
impl UnsafeUnpin for AccessPattern
impl UnwindSafe for AccessPattern
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