#[non_exhaustive]pub struct Shape {
pub max_length: usize,
pub max_depth: usize,
pub count: NonZero<usize>,
pub max_bits: u32,
}
Expand description
Metadata about a TreeSchema
namespace.
Metadata includes paths that may be crate::ValueError::Absent
at runtime.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.max_length: usize
The maximum length of a path in bytes.
This is the exact maximum of the length of the concatenation of the node names
in a crate::Path
excluding the separators. See Self::max_length()
for
the maximum length including separators.
max_depth: usize
The maximum node depth.
This is equal to the exact maximum number of path hierarchy separators. It’s the exact maximum number of key indices.
count: NonZero<usize>
The exact total number of leaf nodes.
max_bits: u32
The maximum number of bits (see crate::Packed
)
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Shape
impl<'de> Deserialize<'de> for Shape
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 Copy for Shape
impl Eq for Shape
impl StructuralPartialEq for Shape
Auto Trait Implementations§
impl Freeze for Shape
impl RefUnwindSafe for Shape
impl Send for Shape
impl Sync for Shape
impl Unpin for Shape
impl UnwindSafe for Shape
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