pub struct Scope {
pub id: String,
pub start: String,
pub end: Option<String>,
pub rules: Vec<Rule>,
/* private fields */
}Expand description
One validated scope: a segmenter (start/end) plus the rules that
run only inside its regions.
start and end are compiled with multi-line mode forced on, so ^
and $ anchor to lines — the natural way to write region boundaries.
Fields§
§id: StringThe scope’s unique id. Shares a namespace with rule ids.
start: StringWhere a region begins, as written.
end: Option<String>Where a region ends, as written (None = run to end of file).
rules: Vec<Rule>The rules that run inside this scope’s regions.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Scope
impl RefUnwindSafe for Scope
impl Send for Scope
impl Sync for Scope
impl Unpin for Scope
impl UnsafeUnpin for Scope
impl UnwindSafe for Scope
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