#[non_exhaustive]pub enum ResourceLimitError {
InputTooLarge {
actual: usize,
limit: usize,
},
TooManyJsonNodes {
limit: usize,
},
TooManyTlogEntries {
actual: usize,
limit: usize,
},
TooManySubjects {
actual: usize,
limit: usize,
},
TooManyBundles {
actual: usize,
limit: usize,
},
TooManyCertificates {
actual: usize,
limit: usize,
},
TooManyCheckpointSignatures {
actual: usize,
limit: usize,
},
}Expand description
A hard resource limit (size, count, or depth) was exceeded. These limits exist to keep parsing cost bounded and independent of attacker-controlled input shape.
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.
InputTooLarge
The raw input exceeded the maximum accepted byte length.
Fields
TooManyJsonNodes
A JSON document parsed to more serde_json::Value nodes than the
limit. Carries no actual count: parsing stops at the limit rather
than walking the rest of the input to total it up.
TooManyTlogEntries
A bundle carried more transparency-log entries than the limit.
Fields
TooManySubjects
An in-toto statement carried more subjects than the limit.
Fields
TooManyBundles
A BundleSet container carried more bundles than the limit.
Fields
TooManyCertificates
A certificate chain carried more certificates than the limit.
Fields
TooManyCheckpointSignatures
A checkpoint carried more signature lines than the limit.
Trait Implementations§
Source§impl Debug for ResourceLimitError
impl Debug for ResourceLimitError
Source§impl Display for ResourceLimitError
impl Display for ResourceLimitError
Source§impl Error for ResourceLimitError
impl Error for ResourceLimitError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<ResourceLimitError> for Error
impl From<ResourceLimitError> for Error
Source§fn from(source: ResourceLimitError) -> Self
fn from(source: ResourceLimitError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ResourceLimitError
impl RefUnwindSafe for ResourceLimitError
impl Send for ResourceLimitError
impl Sync for ResourceLimitError
impl Unpin for ResourceLimitError
impl UnsafeUnpin for ResourceLimitError
impl UnwindSafe for ResourceLimitError
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