Trait modalkit::prelude::BoundaryTest
source · pub trait BoundaryTest {
// Required methods
fn is_boundary_begin(&self, ctx: &BoundaryTestContext) -> bool;
fn is_boundary_end(&self, ctx: &BoundaryTestContext) -> bool;
// Provided method
fn is_boundary(
&self,
terminus: MoveTerminus,
ctx: &BoundaryTestContext,
) -> bool { ... }
}
Expand description
Trait for types which have simple start and end boundaries within a text document.
Boundaries are searched for a character at a time, with the previous and following character context provided if available.
Required Methods§
sourcefn is_boundary_begin(&self, ctx: &BoundaryTestContext) -> bool
fn is_boundary_begin(&self, ctx: &BoundaryTestContext) -> bool
Check whether we are at the beginning of the range.
sourcefn is_boundary_end(&self, ctx: &BoundaryTestContext) -> bool
fn is_boundary_end(&self, ctx: &BoundaryTestContext) -> bool
Check whether we are at the end of the range.
Provided Methods§
sourcefn is_boundary(&self, terminus: MoveTerminus, ctx: &BoundaryTestContext) -> bool
fn is_boundary(&self, terminus: MoveTerminus, ctx: &BoundaryTestContext) -> bool
Check whether we are at the given side of the range.