Struct alacritty_terminal::index::Point
source · pub struct Point<L = Line, C = Column> {
pub line: L,
pub column: C,
}
Expand description
Index in the grid using row, column notation.
Fields§
§line: L
§column: C
Implementations§
source§impl Point
impl Point
sourcepub fn sub<D>(self, dimensions: &D, boundary: Boundary, rhs: usize) -> Selfwhere
D: Dimensions,
pub fn sub<D>(self, dimensions: &D, boundary: Boundary, rhs: usize) -> Selfwhere
D: Dimensions,
Subtract a number of columns from a point.
sourcepub fn add<D>(self, dimensions: &D, boundary: Boundary, rhs: usize) -> Selfwhere
D: Dimensions,
pub fn add<D>(self, dimensions: &D, boundary: Boundary, rhs: usize) -> Selfwhere
D: Dimensions,
Add a number of columns to a point.
sourcepub fn grid_clamp<D>(self, dimensions: &D, boundary: Boundary) -> Selfwhere
D: Dimensions,
pub fn grid_clamp<D>(self, dimensions: &D, boundary: Boundary) -> Selfwhere
D: Dimensions,
Clamp a point to a grid boundary.
Trait Implementations§
source§impl<'de, L, C> Deserialize<'de> for Point<L, C>where
L: Deserialize<'de>,
C: Deserialize<'de>,
impl<'de, L, C> Deserialize<'de> for Point<L, C>where
L: Deserialize<'de>,
C: Deserialize<'de>,
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
source§impl<L: Ord, C: Ord> Ord for Point<L, C>
impl<L: Ord, C: Ord> Ord for Point<L, C>
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<L: PartialEq, C: PartialEq> PartialEq for Point<L, C>
impl<L: PartialEq, C: PartialEq> PartialEq for Point<L, C>
source§impl<L: Ord, C: Ord> PartialOrd for Point<L, C>
impl<L: Ord, C: Ord> PartialOrd for Point<L, C>
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 moreimpl<L: Copy, C: Copy> Copy for Point<L, C>
impl<L: Eq, C: Eq> Eq for Point<L, C>
impl<L, C> StructuralPartialEq for Point<L, C>
Auto Trait Implementations§
impl<L, C> Freeze for Point<L, C>
impl<L, C> RefUnwindSafe for Point<L, C>where
L: RefUnwindSafe,
C: RefUnwindSafe,
impl<L, C> Send for Point<L, C>
impl<L, C> Sync for Point<L, C>
impl<L, C> Unpin for Point<L, C>
impl<L, C> UnwindSafe for Point<L, C>where
L: UnwindSafe,
C: UnwindSafe,
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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> ResetDiscriminant<T> for Twhere
T: Copy,
impl<T> ResetDiscriminant<T> for Twhere
T: Copy,
source§fn discriminant(&self) -> T
fn discriminant(&self) -> T
Value based on which equality for the reset will be determined.