pub enum RangeBound {
Line(u32),
Mark(char),
CurrentLine,
LastLine,
Pattern(String),
Offset {
base: Box<RangeBound>,
delta: i32,
},
}Expand description
One end of a Range::Span.
Variants§
Line(u32)
Absolute line number, 0-based (the user’s :3 is Line(2));
clamped to the last line on resolution.
Mark(char)
A mark’s line ('a, '<, '>, etc.). < / > resolve to the last
Visual selection’s first / last line; an unset mark resolves to the
cursor line.
CurrentLine
. – the cursor’s line.
LastLine
$ – the buffer’s last line.
Pattern(String)
Pattern-relative (/foo/, ?bar?): the pattern text, without
delimiters. Not searched yet – resolves to the cursor line.
Offset
Offset from another bound (+1, -3, .+5); the result is
clamped to the buffer.
Fields
§
base: Box<RangeBound>The bound the offset is relative to.
Trait Implementations§
Source§impl Clone for RangeBound
impl Clone for RangeBound
Source§fn clone(&self) -> RangeBound
fn clone(&self) -> RangeBound
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 Debug for RangeBound
impl Debug for RangeBound
Source§impl<'de> Deserialize<'de> for RangeBound
impl<'de> Deserialize<'de> for RangeBound
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for RangeBound
Source§impl PartialEq for RangeBound
impl PartialEq for RangeBound
Source§impl Serialize for RangeBound
impl Serialize for RangeBound
impl StructuralPartialEq for RangeBound
Auto Trait Implementations§
impl Freeze for RangeBound
impl RefUnwindSafe for RangeBound
impl Send for RangeBound
impl Sync for RangeBound
impl Unpin for RangeBound
impl UnsafeUnpin for RangeBound
impl UnwindSafe for RangeBound
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.