#[non_exhaustive]pub enum Limit {
Bytes,
Strings,
Types,
Consts,
ConstDepth,
Functions,
Insts,
TotalInsts,
Items,
PerFunction,
Arity,
}Expand description
Which budget a DecodeErrorKind::LimitExceeded refers to.
§Examples
use bytecode_lang::Limit;
assert_eq!(Limit::ConstDepth.to_string(), "constant nesting depth");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.
Bytes
Strings
Types
Consts
ConstDepth
Functions
Insts
TotalInsts
Items
PerFunction
The format’s cap of 65,536 entries on the tables a 16-bit operand indexes: a function’s registers, captures, name refs, type refs, and call shapes, and a struct’s fields.
Arity
The format’s cap of 255 entries on a parameter list or a call shape (call windows and argument counts are 8-bit).
Trait Implementations§
impl Copy for Limit
impl Eq for Limit
Source§impl Ord for Limit
impl Ord for Limit
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Limit
impl PartialOrd for Limit
impl StructuralPartialEq for Limit
Auto Trait Implementations§
impl Freeze for Limit
impl RefUnwindSafe for Limit
impl Send for Limit
impl Sync for Limit
impl Unpin for Limit
impl UnsafeUnpin for Limit
impl UnwindSafe for Limit
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