Struct pepper::buffer_position::BufferPosition
source · pub struct BufferPosition {
pub line_index: BufferPositionIndex,
pub column_byte_index: BufferPositionIndex,
}
Fields§
§line_index: BufferPositionIndex
§column_byte_index: BufferPositionIndex
Implementations§
source§impl BufferPosition
impl BufferPosition
pub const fn zero() -> Self
pub const fn line_col(
line_index: BufferPositionIndex,
column_byte_index: BufferPositionIndex
) -> Self
pub fn insert(self, range: BufferRange) -> Self
pub fn delete(self, range: BufferRange) -> Self
pub fn parse(s: &str) -> Option<(Self, &str)>
Trait Implementations§
source§impl Clone for BufferPosition
impl Clone for BufferPosition
source§fn clone(&self) -> BufferPosition
fn clone(&self) -> BufferPosition
Returns a copy of the value. Read more
1.0.0 · 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 BufferPosition
impl Debug for BufferPosition
source§impl Display for BufferPosition
impl Display for BufferPosition
source§impl Ord for BufferPosition
impl Ord for BufferPosition
source§impl PartialEq<BufferPosition> for BufferPosition
impl PartialEq<BufferPosition> for BufferPosition
source§fn eq(&self, other: &BufferPosition) -> bool
fn eq(&self, other: &BufferPosition) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<BufferPosition> for BufferPosition
impl PartialOrd<BufferPosition> for BufferPosition
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more