Struct language2::PointUtf16
source · pub struct PointUtf16 {
pub row: u32,
pub column: u32,
}
Fields§
§row: u32
§column: u32
Implementations§
source§impl PointUtf16
impl PointUtf16
pub const MAX: PointUtf16 = Self{ row: u32::MAX, column: u32::MAX,}
pub fn new(row: u32, column: u32) -> PointUtf16
pub fn zero() -> PointUtf16
pub fn is_zero(&self) -> bool
pub fn saturating_sub(self, other: PointUtf16) -> PointUtf16
Trait Implementations§
source§impl<'a> Add<&'a PointUtf16> for PointUtf16
impl<'a> Add<&'a PointUtf16> for PointUtf16
§type Output = PointUtf16
type Output = PointUtf16
The resulting type after applying the
+
operator.source§fn add(
self,
other: &'a PointUtf16
) -> <PointUtf16 as Add<&'a PointUtf16>>::Output
fn add( self, other: &'a PointUtf16 ) -> <PointUtf16 as Add<&'a PointUtf16>>::Output
Performs the
+
operation. Read moresource§impl Add<PointUtf16> for PointUtf16
impl Add<PointUtf16> for PointUtf16
§type Output = PointUtf16
type Output = PointUtf16
The resulting type after applying the
+
operator.source§fn add(self, other: PointUtf16) -> <PointUtf16 as Add<PointUtf16>>::Output
fn add(self, other: PointUtf16) -> <PointUtf16 as Add<PointUtf16>>::Output
Performs the
+
operation. Read moresource§impl<'a> AddAssign<&'a PointUtf16> for PointUtf16
impl<'a> AddAssign<&'a PointUtf16> for PointUtf16
source§fn add_assign(&mut self, other: &'a PointUtf16)
fn add_assign(&mut self, other: &'a PointUtf16)
Performs the
+=
operation. Read moresource§impl AddAssign<PointUtf16> for PointUtf16
impl AddAssign<PointUtf16> for PointUtf16
source§fn add_assign(&mut self, other: PointUtf16)
fn add_assign(&mut self, other: PointUtf16)
Performs the
+=
operation. Read moresource§impl Clone for PointUtf16
impl Clone for PointUtf16
source§fn clone(&self) -> PointUtf16
fn clone(&self) -> PointUtf16
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 PointUtf16
impl Debug for PointUtf16
source§impl Default for PointUtf16
impl Default for PointUtf16
source§fn default() -> PointUtf16
fn default() -> PointUtf16
Returns the “default value” for a type. Read more
source§impl<'a> Dimension<'a, ChunkSummary> for PointUtf16
impl<'a> Dimension<'a, ChunkSummary> for PointUtf16
fn add_summary(&mut self, summary: &'a ChunkSummary, _: &())
fn from_summary(summary: &'a S, cx: &<S as Summary>::Context) -> Self
source§impl FromAnchor for PointUtf16
impl FromAnchor for PointUtf16
fn from_anchor(anchor: &Anchor, snapshot: &BufferSnapshot) -> PointUtf16
source§impl Hash for PointUtf16
impl Hash for PointUtf16
source§impl Ord for PointUtf16
impl Ord for PointUtf16
source§fn cmp(&self, other: &PointUtf16) -> Ordering
fn cmp(&self, other: &PointUtf16) -> Ordering
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 PartialEq<PointUtf16> for PointUtf16
impl PartialEq<PointUtf16> for PointUtf16
source§fn eq(&self, other: &PointUtf16) -> bool
fn eq(&self, other: &PointUtf16) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<PointUtf16> for PointUtf16
impl PartialOrd<PointUtf16> for PointUtf16
source§fn partial_cmp(&self, other: &PointUtf16) -> Option<Ordering>
fn partial_cmp(&self, other: &PointUtf16) -> Option<Ordering>
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 moresource§impl<'a> Sub<&'a PointUtf16> for PointUtf16
impl<'a> Sub<&'a PointUtf16> for PointUtf16
§type Output = PointUtf16
type Output = PointUtf16
The resulting type after applying the
-
operator.source§fn sub(
self,
other: &'a PointUtf16
) -> <PointUtf16 as Sub<&'a PointUtf16>>::Output
fn sub( self, other: &'a PointUtf16 ) -> <PointUtf16 as Sub<&'a PointUtf16>>::Output
Performs the
-
operation. Read moresource§impl Sub<PointUtf16> for PointUtf16
impl Sub<PointUtf16> for PointUtf16
§type Output = PointUtf16
type Output = PointUtf16
The resulting type after applying the
-
operator.source§fn sub(self, other: PointUtf16) -> <PointUtf16 as Sub<PointUtf16>>::Output
fn sub(self, other: PointUtf16) -> <PointUtf16 as Sub<PointUtf16>>::Output
Performs the
-
operation. Read moresource§impl TextDimension for PointUtf16
impl TextDimension for PointUtf16
fn from_text_summary(summary: &TextSummary) -> PointUtf16
fn add_assign(&mut self, other: &PointUtf16)
source§impl ToOffset for PointUtf16
impl ToOffset for PointUtf16
fn to_offset(&self, snapshot: &BufferSnapshot) -> usize
source§impl ToPointUtf16 for PointUtf16
impl ToPointUtf16 for PointUtf16
fn to_point_utf16(&self, _: &BufferSnapshot) -> PointUtf16
impl Copy for PointUtf16
impl Eq for PointUtf16
impl StructuralEq for PointUtf16
impl StructuralPartialEq for PointUtf16
Auto Trait Implementations§
impl RefUnwindSafe for PointUtf16
impl Send for PointUtf16
impl Sync for PointUtf16
impl Unpin for PointUtf16
impl UnwindSafe for PointUtf16
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.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> 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> IsDefault for Twhere
T: Default + PartialEq<T> + Copy,
impl<T> IsDefault for Twhere T: Default + PartialEq<T> + Copy,
source§fn is_default(&self) -> bool
fn is_default(&self) -> bool
Checks that type has a default value.