#[non_exhaustive]pub enum StructureResource {
Depth,
Nodes,
SequenceItems,
MapEntries,
KeyBytes,
}Expand description
A structural quantity constrained while processing nested data.
§Examples
use qubit_budget::ResourceLimit;
use qubit_budget::StructureResource;
let limit = ResourceLimit::new(StructureResource::Depth, 4_usize);
assert_eq!(limit.maximum(), 4);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.
Depth
The nesting depth of the current value.
Nodes
The cumulative number of nodes processed in one session.
SequenceItems
The number of items in one sequence value.
MapEntries
The number of entries in one map value.
KeyBytes
The byte length of one structural key.
Trait Implementations§
Source§impl Clone for StructureResource
impl Clone for StructureResource
Source§fn clone(&self) -> StructureResource
fn clone(&self) -> StructureResource
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 StructureResource
Source§impl Debug for StructureResource
impl Debug for StructureResource
impl Eq for StructureResource
Source§impl Hash for StructureResource
impl Hash for StructureResource
Source§impl PartialEq for StructureResource
impl PartialEq for StructureResource
impl StructuralPartialEq for StructureResource
Auto Trait Implementations§
impl Freeze for StructureResource
impl RefUnwindSafe for StructureResource
impl Send for StructureResource
impl Sync for StructureResource
impl Unpin for StructureResource
impl UnsafeUnpin for StructureResource
impl UnwindSafe for StructureResource
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