#[non_exhaustive]pub struct WalkOptions {
pub max_depth: u32,
pub expand_inserts: bool,
pub max_work: u64,
}Expand description
Options of Document::walk_with.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.max_depth: u32Deepest block / group nesting that is expanded.
expand_inserts: boolExpand Insert entities (and Dimension blocks). When false they are reported as-is.
max_work: u64Work budget. Every visited entity costs 1 plus its size (vertices, spline samples,
text bytes, hatch edges, mesh faces), every insert array cell costs 1. When the budget
is used up the walk stops and WalkStats::truncated is set, so hostile nesting or
giant arrays cannot hang the caller.
Implementations§
Source§impl WalkOptions
impl WalkOptions
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Expands inserts up to the default depth, with the default work budget.
Sourcepub const fn with_max_depth(self, max_depth: u32) -> Self
pub const fn with_max_depth(self, max_depth: u32) -> Self
Sets Self::max_depth.
Sourcepub const fn with_expand_inserts(self, expand_inserts: bool) -> Self
pub const fn with_expand_inserts(self, expand_inserts: bool) -> Self
Sets Self::expand_inserts.
Sourcepub const fn with_max_work(self, max_work: u64) -> Self
pub const fn with_max_work(self, max_work: u64) -> Self
Sets Self::max_work.
Trait Implementations§
Source§impl Clone for WalkOptions
impl Clone for WalkOptions
impl Copy for WalkOptions
Source§impl Debug for WalkOptions
impl Debug for WalkOptions
Source§impl Default for WalkOptions
impl Default for WalkOptions
impl Eq for WalkOptions
Source§impl PartialEq for WalkOptions
impl PartialEq for WalkOptions
impl StructuralPartialEq for WalkOptions
Auto Trait Implementations§
impl Forget for WalkOptions
impl Freeze for WalkOptions
impl Move for WalkOptions
impl RefUnwindSafe for WalkOptions
impl Send for WalkOptions
impl Sync for WalkOptions
impl Unpin for WalkOptions
impl UnsafeUnpin for WalkOptions
impl UnwindSafe for WalkOptions
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