pub struct RedactionLimits { /* private fields */ }Expand description
Structural and JSON limits for one redaction operation.
§Examples
use qubit_redact::RedactionLimits;
let mut builder = RedactionLimits::builder();
builder.max_output_bytes(128);
let limits = builder.build();
assert_eq!(limits.max_output_bytes(), 128);Implementations§
Source§impl RedactionLimits
impl RedactionLimits
Sourcepub fn builder() -> RedactionLimitsBuilder
pub fn builder() -> RedactionLimitsBuilder
Creates a builder initialized with the standard redaction limits.
Sourcepub const fn max_input_bytes(&self) -> usize
pub const fn max_input_bytes(&self) -> usize
Returns the maximum source bytes one transaction may inspect.
Sourcepub const fn max_output_bytes(&self) -> usize
pub const fn max_output_bytes(&self) -> usize
Returns the maximum safe output bytes one transaction may retain.
Sourcepub const fn max_collection_items(&self) -> Option<usize>
pub const fn max_collection_items(&self) -> Option<usize>
Returns the shared maximum item count for one sequence or map.
Sourcepub const fn max_key_bytes(&self) -> Option<usize>
pub const fn max_key_bytes(&self) -> Option<usize>
Returns the maximum structural key length.
Sourcepub const fn max_json_depth(&self) -> Option<usize>
pub const fn max_json_depth(&self) -> Option<usize>
Returns the maximum JSON nesting depth.
Sourcepub const fn max_json_nodes(&self) -> Option<usize>
pub const fn max_json_nodes(&self) -> Option<usize>
Returns the maximum number of JSON nodes.
Sourcepub const fn max_json_collection_items(&self) -> Option<usize>
pub const fn max_json_collection_items(&self) -> Option<usize>
Returns the maximum number of items in one JSON collection.
Sourcepub const fn max_json_key_bytes(&self) -> Option<usize>
pub const fn max_json_key_bytes(&self) -> Option<usize>
Returns the maximum JSON object-key length.
Sourcepub const fn max_json_string_bytes(&self) -> Option<usize>
pub const fn max_json_string_bytes(&self) -> Option<usize>
Returns the maximum JSON string length.
Sourcepub const fn max_json_number_bytes(&self) -> Option<usize>
pub const fn max_json_number_bytes(&self) -> Option<usize>
Returns the maximum JSON number representation length.
Sourcepub const fn max_json_payload_bytes(&self) -> Option<usize>
pub const fn max_json_payload_bytes(&self) -> Option<usize>
Returns the cumulative JSON payload-byte maximum.
Trait Implementations§
Source§impl Clone for RedactionLimits
impl Clone for RedactionLimits
Source§fn clone(&self) -> RedactionLimits
fn clone(&self) -> RedactionLimits
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 RedactionLimits
Source§impl Debug for RedactionLimits
impl Debug for RedactionLimits
Source§impl Default for RedactionLimits
impl Default for RedactionLimits
impl Eq for RedactionLimits
Source§impl PartialEq for RedactionLimits
impl PartialEq for RedactionLimits
impl StructuralPartialEq for RedactionLimits
Auto Trait Implementations§
impl Freeze for RedactionLimits
impl RefUnwindSafe for RedactionLimits
impl Send for RedactionLimits
impl Sync for RedactionLimits
impl Unpin for RedactionLimits
impl UnsafeUnpin for RedactionLimits
impl UnwindSafe for RedactionLimits
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