pub struct Limits {
pub max_stack_depth: usize,
pub max_versions: usize,
pub max_nodes: usize,
pub max_steps: u64,
pub max_millis: u64,
}Expand description
解析的资源上限:输入不可信,栈深、版本数、节点数都必须有界。
Fields§
§max_stack_depth: usize§max_versions: usize§max_nodes: usize§max_steps: u64解析步数上限;0 表示按输入规模自动算(每字节 400 步加 20 万步)。超限返回退化树。
max_millis: u64墙钟时间上限(毫秒);0 表示不限。超限返回退化树。
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Limits
impl RefUnwindSafe for Limits
impl Send for Limits
impl Sync for Limits
impl Unpin for Limits
impl UnsafeUnpin for Limits
impl UnwindSafe for Limits
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