pub trait Scoper: Send + Sync {
// Required method
fn scope_raw<'viewee>(
&self,
input: &'viewee str,
) -> RangesWithContext<'viewee>;
// Provided method
fn scope<'viewee>(&self, input: &'viewee str) -> ROScopes<'viewee> { ... }
}Expand description
An item capable of scoping down a given input into individual scopes.
Required Methods§
Sourcefn scope_raw<'viewee>(&self, input: &'viewee str) -> RangesWithContext<'viewee>
fn scope_raw<'viewee>(&self, input: &'viewee str) -> RangesWithContext<'viewee>
Scope the given input, returning raw ranges.
Raw ranges are those not turned into ROScopes yet.
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl Scoper for &[Box<dyn LanguageScoper>]
impl Scoper for &[Box<dyn LanguageScoper>]
Source§fn scope_raw<'viewee>(&self, input: &'viewee str) -> RangesWithContext<'viewee>
fn scope_raw<'viewee>(&self, input: &'viewee str) -> RangesWithContext<'viewee>
Allows multiple scopers to be applied all at once.
They are OR’d together in the sense that if any of the scopers hit, a
position/range is considered in scope. In some sense, this is the opposite of
ScopedViewBuilder::explode, which is subtractive.