pub struct TreeFormat {
pub chunking: ChunkingSpec,
pub node_layout: NodeLayoutSpec,
pub value_encoding: Encoding,
}Expand description
Persisted settings that determine tree shape and content IDs.
Fields§
§chunking: ChunkingSpec§node_layout: NodeLayoutSpec§value_encoding: EncodingImplementations§
Source§impl TreeFormat
impl TreeFormat
Sourcepub fn validate(&self) -> Result<(), Error>
pub fn validate(&self) -> Result<(), Error>
Validate persisted identifiers and structural bounds known at this layer.
Sourcepub fn canonical_bytes(&self) -> Result<Vec<u8>, Error>
pub fn canonical_bytes(&self) -> Result<Vec<u8>, Error>
Encode the descriptor without maps or platform-sized integers.
Sourcepub fn from_canonical_bytes(bytes: &[u8]) -> Result<Self, Error>
pub fn from_canonical_bytes(bytes: &[u8]) -> Result<Self, Error>
Decode a canonical persisted descriptor.
Trait Implementations§
Source§impl Clone for TreeFormat
impl Clone for TreeFormat
Source§fn clone(&self) -> TreeFormat
fn clone(&self) -> TreeFormat
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 moreSource§impl Debug for TreeFormat
impl Debug for TreeFormat
Source§impl Default for TreeFormat
impl Default for TreeFormat
Source§impl<'de> Deserialize<'de> for TreeFormat
impl<'de> Deserialize<'de> for TreeFormat
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for TreeFormat
Source§impl PartialEq for TreeFormat
impl PartialEq for TreeFormat
Source§impl Serialize for TreeFormat
impl Serialize for TreeFormat
impl StructuralPartialEq for TreeFormat
Auto Trait Implementations§
impl Freeze for TreeFormat
impl RefUnwindSafe for TreeFormat
impl Send for TreeFormat
impl Sync for TreeFormat
impl Unpin for TreeFormat
impl UnsafeUnpin for TreeFormat
impl UnwindSafe for TreeFormat
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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