pub struct DirectoryRef {
pub key: String,
pub length: u64,
pub directory_version: u8,
pub encoding: Option<String>,
pub layout: Option<String>,
pub root_length: Option<u64>,
pub page_count: Option<u64>,
pub page_entries: Option<u64>,
}Expand description
Pointer to the encoded directory object.
Fields§
§key: StringObject key, relative to the dataset root (e.g. index/<hash>.sttd).
length: u64Directory object length in bytes (the at-rest object, i.e. the
compressed length when encoding is set).
directory_version: u8Directory codec version (5 for the packed format). The leaf pages of a
paged directory are this same v5 codec — layout (below), not this
version, discriminates the container shape.
encoding: Option<String>At-rest encoding of the directory object. Some("zstd") means the
object bytes are a zstd frame wrapping the codec bytes; absent (the
shape every pre-encoding manifest has) means raw codec bytes. For a
paged directory it describes the framing of each page (root + every
leaf), not one frame over the whole object. The content address and
length always describe the at-rest bytes.
layout: Option<String>Container layout. Some("paged") = a root page + leaf pages (Wave 2);
absent or Some("single") = the single whole-load object. Readers that
don’t know "paged" fail loudly (the root’s first byte isn’t a valid v5
directory version), which is why readers ship before any paged dataset.
root_length: Option<u64>At-rest byte length of the root page (a prefix of the object). Present
iff layout == "paged"; the reader range-GETs bytes=0-(rootLength-1)
for the root under formatVersion 1, or bytes=0-(8+rootLength-1) under
formatVersion 2 (the 8-byte object magic shifts the root), then leaf
ranges on demand.
page_count: Option<u64>Number of leaf pages (informational / validation). Paged only.
page_entries: Option<u64>Nominal entries-per-page used at build (informational). Paged only.
Implementations§
Trait Implementations§
Source§impl Clone for DirectoryRef
impl Clone for DirectoryRef
Source§fn clone(&self) -> DirectoryRef
fn clone(&self) -> DirectoryRef
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DirectoryRef
impl Debug for DirectoryRef
Source§impl<'de> Deserialize<'de> for DirectoryRef
impl<'de> Deserialize<'de> for DirectoryRef
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for DirectoryRef
impl RefUnwindSafe for DirectoryRef
impl Send for DirectoryRef
impl Sync for DirectoryRef
impl Unpin for DirectoryRef
impl UnsafeUnpin for DirectoryRef
impl UnwindSafe for DirectoryRef
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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