pub struct Distance {
pub lines: usize,
pub offset: usize,
}
Expand description
A vector value representing a span in a buffer. Unlike the Range type, whose two positions are absolutes, a Distance is meant to be used relative to a Position.
Fields§
§lines: usize
§offset: usize
Implementations§
Trait Implementations§
Source§impl AddAssign<Distance> for Position
impl AddAssign<Distance> for Position
Source§fn add_assign(&mut self, distance: Distance)
fn add_assign(&mut self, distance: Distance)
Performs the
+=
operation. Read moreimpl Copy for Distance
impl StructuralPartialEq for Distance
Auto Trait Implementations§
impl Freeze for Distance
impl RefUnwindSafe for Distance
impl Send for Distance
impl Sync for Distance
impl Unpin for Distance
impl UnwindSafe for Distance
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