pub struct RangeState {
pub tail: CursorState,
pub head: CursorState,
pub goal_column: Option<GoalColumn>,
}Fields§
§tail: CursorState§head: CursorState§goal_column: Option<GoalColumn>Implementations§
Source§impl RangeState
impl RangeState
pub fn transform(&mut self, ops: &Edit, text: &Rope)
pub fn start(&self) -> &CursorState
pub fn end(&self) -> &CursorState
Sourcepub fn is_forward(&self) -> bool
pub fn is_forward(&self) -> bool
A collapsed range is considered forward.
pub fn contains(&self, other: &Self) -> bool
pub fn with_bounds(&self, start: usize, end: usize) -> Self
pub fn resolve_goal_column(&self, text: &Text) -> GoalColumn
pub fn save(&self, text: &Text) -> RangeSnapshot
Trait Implementations§
Source§impl Clone for RangeState
impl Clone for RangeState
Source§fn clone(&self) -> RangeState
fn clone(&self) -> RangeState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for RangeState
impl Default for RangeState
Source§fn default() -> RangeState
fn default() -> RangeState
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RangeState
impl RefUnwindSafe for RangeState
impl Send for RangeState
impl Sync for RangeState
impl Unpin for RangeState
impl UnsafeUnpin for RangeState
impl UnwindSafe for RangeState
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