pub struct RewriteOptions {Show 15 fields
pub label: Option<String>,
pub scope: Option<Scope>,
pub xpath: Option<String>,
pub on_match: Option<Tokens>,
pub attributes: Option<String>,
pub attributes_map: Option<FxHashMap<String, String>>,
pub replace: Option<RewriteReplaceClosure>,
pub regexp: Option<String>,
pub select: Option<String>,
pub select_count: Option<usize>,
pub is_math: bool,
pub wildcard_paths: Option<Vec<WildPath>>,
pub declare_filter: Option<DeclarePattern>,
pub passes: Option<usize>,
pub local_replace: bool,
}Fields§
§label: Option<String>§scope: Option<Scope>§xpath: Option<String>§on_match: Option<Tokens>§attributes: Option<String>§attributes_map: Option<FxHashMap<String, String>>§replace: Option<RewriteReplaceClosure>§regexp: Option<String>§select: Option<String>§select_count: Option<usize>§is_math: bool§wildcard_paths: Option<Vec<WildPath>>§declare_filter: Option<DeclarePattern>Declare-side structural filter for \lxDeclare rules — the compiled
declare::DeclarePattern whose broad XPath needs Rust-side
verification (declare::declare_node_matches) on every Select match.
Set by BOTH attribute and replace registrations.
passes: Option<usize>Rust-only: run the rule up to this many times, each later pass on the nodes the previous one inserted.
For a rule whose select can match only what its replacement inserts (base_xmath’s thousands separator).
local_replace: boolRust-only opt-in for built-in rules whose replace closure is strictly DOM-local
(never calls findnodes, \label, or inspects/moves unrelated siblings): splices
replacements in O(inserted) instead of detaching/re-appending all following siblings.
Trait Implementations§
Source§impl Clone for RewriteOptions
impl Clone for RewriteOptions
Source§impl Debug for RewriteOptions
impl Debug for RewriteOptions
Source§impl Default for RewriteOptions
impl Default for RewriteOptions
Auto Trait Implementations§
impl !RefUnwindSafe for RewriteOptions
impl !Send for RewriteOptions
impl !Sync for RewriteOptions
impl !UnwindSafe for RewriteOptions
impl Freeze for RewriteOptions
impl Unpin for RewriteOptions
impl UnsafeUnpin for RewriteOptions
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