pub struct Limits { /* private fields */ }Expand description
Caller-lowerable limits; private fields prevent bypassing hard ceilings.
Implementations§
Source§impl Limits
impl Limits
Sourcepub fn with_input_bytes(self, value: usize) -> Result<Self, CborError>
pub fn with_input_bytes(self, value: usize) -> Result<Self, CborError>
Set or inspect the maximum received input bytes.
Sourcepub const fn input_bytes(self) -> usize
pub const fn input_bytes(self) -> usize
Set or inspect the maximum received input bytes.
Sourcepub fn with_output_bytes(self, value: usize) -> Result<Self, CborError>
pub fn with_output_bytes(self, value: usize) -> Result<Self, CborError>
Set or inspect the maximum encoded output bytes.
Sourcepub const fn output_bytes(self) -> usize
pub const fn output_bytes(self) -> usize
Set or inspect the maximum encoded output bytes.
Sourcepub fn with_depth(self, value: usize) -> Result<Self, CborError>
pub fn with_depth(self, value: usize) -> Result<Self, CborError>
Set or inspect the maximum simultaneously open containers and tags.
Sourcepub const fn depth(self) -> usize
pub const fn depth(self) -> usize
Set or inspect the maximum simultaneously open containers and tags.
Sourcepub fn with_nodes(self, value: usize) -> Result<Self, CborError>
pub fn with_nodes(self, value: usize) -> Result<Self, CborError>
Set or inspect the maximum structural node count.
Sourcepub fn with_entries(self, value: usize) -> Result<Self, CborError>
pub fn with_entries(self, value: usize) -> Result<Self, CborError>
Set or inspect the maximum entries or chunks in one container.
Sourcepub const fn entries(self) -> usize
pub const fn entries(self) -> usize
Set or inspect the maximum entries or chunks in one container.
Sourcepub fn with_byte_string_bytes(self, value: usize) -> Result<Self, CborError>
pub fn with_byte_string_bytes(self, value: usize) -> Result<Self, CborError>
Set or inspect aggregate byte-string content bytes.
Sourcepub const fn byte_string_bytes(self) -> usize
pub const fn byte_string_bytes(self) -> usize
Set or inspect aggregate byte-string content bytes.
Sourcepub fn with_text_bytes(self, value: usize) -> Result<Self, CborError>
pub fn with_text_bytes(self, value: usize) -> Result<Self, CborError>
Set or inspect aggregate UTF-8 text bytes.
Sourcepub const fn text_bytes(self) -> usize
pub const fn text_bytes(self) -> usize
Set or inspect aggregate UTF-8 text bytes.