#[non_exhaustive]pub enum ResourceLimit {
MaxOperations,
MaxCallLevels,
MaxExprDepth,
MaxStringSize,
MaxArraySize,
MaxMapSize,
}Expand description
Which of the configured rhai resource ceilings tripped. One-to-one
with the MAX_* constants in crate::engine; a typed enum here
(rather than &'static str) keeps PluginError::ResourceExceeded
and linesmith doctor output typo-proof.
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.
Implementations§
Trait Implementations§
Source§impl Clone for ResourceLimit
impl Clone for ResourceLimit
Source§fn clone(&self) -> ResourceLimit
fn clone(&self) -> ResourceLimit
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 moreSource§impl Debug for ResourceLimit
impl Debug for ResourceLimit
Source§impl Display for ResourceLimit
impl Display for ResourceLimit
Source§impl PartialEq for ResourceLimit
impl PartialEq for ResourceLimit
Source§fn eq(&self, other: &ResourceLimit) -> bool
fn eq(&self, other: &ResourceLimit) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for ResourceLimit
impl Eq for ResourceLimit
impl StructuralPartialEq for ResourceLimit
Auto Trait Implementations§
impl Freeze for ResourceLimit
impl RefUnwindSafe for ResourceLimit
impl Send for ResourceLimit
impl Sync for ResourceLimit
impl Unpin for ResourceLimit
impl UnsafeUnpin for ResourceLimit
impl UnwindSafe for ResourceLimit
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