Struct zed2::languages::Point

source ·
pub struct Point {
    pub row: u32,
    pub column: u32,
}

Fields§

§row: u32§column: u32

Implementations§

source§

impl Point

source

pub const MAX: Point = Self{ row: u32::MAX, column: u32::MAX,}

source

pub fn new(row: u32, column: u32) -> Point

source

pub fn zero() -> Point

source

pub fn parse_str(s: &str) -> Point

source

pub fn is_zero(&self) -> bool

source

pub fn saturating_sub(self, other: Point) -> Point

Trait Implementations§

source§

impl<'a> Add<&'a Point> for Point

§

type Output = Point

The resulting type after applying the + operator.
source§

fn add(self, other: &'a Point) -> <Point as Add<&'a Point>>::Output

Performs the + operation. Read more
source§

impl Add<Point> for Point

§

type Output = Point

The resulting type after applying the + operator.
source§

fn add(self, other: Point) -> <Point as Add<Point>>::Output

Performs the + operation. Read more
source§

impl<'a> AddAssign<&'a Point> for Point

source§

fn add_assign(&mut self, other: &'a Point)

Performs the += operation. Read more
source§

impl AddAssign<Point> for Point

source§

fn add_assign(&mut self, other: Point)

Performs the += operation. Read more
source§

impl Clone for Point

source§

fn clone(&self) -> Point

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Point

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for Point

source§

fn default() -> Point

Returns the “default value” for a type. Read more
source§

impl<'a> Dimension<'a, ChunkSummary> for Point

source§

fn add_summary(&mut self, summary: &'a ChunkSummary, _: &())

§

fn from_summary(summary: &'a S, cx: &<S as Summary>::Context) -> Self

source§

impl<'a> Dimension<'a, ExcerptSummary> for Point

source§

fn add_summary(&mut self, summary: &'a ExcerptSummary, _: &())

§

fn from_summary(summary: &'a S, cx: &<S as Summary>::Context) -> Self

source§

impl<'a> Dimension<'a, TransformSummary> for Point

source§

fn add_summary(&mut self, summary: &'a TransformSummary, _: &())

§

fn from_summary(summary: &'a S, cx: &<S as Summary>::Context) -> Self

source§

impl FromAnchor for Point

source§

fn from_anchor(anchor: &Anchor, snapshot: &BufferSnapshot) -> Point

source§

impl Hash for Point

source§

fn hash<__H>(&self, state: &mut __H)where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for Point

source§

fn cmp(&self, other: &Point) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
source§

impl PartialEq<Point> for Point

source§

fn eq(&self, other: &Point) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd<Point> for Point

source§

fn partial_cmp(&self, other: &Point) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<'a> Sub<&'a Point> for Point

§

type Output = Point

The resulting type after applying the - operator.
source§

fn sub(self, other: &'a Point) -> <Point as Sub<&'a Point>>::Output

Performs the - operation. Read more
source§

impl Sub<Point> for Point

§

type Output = Point

The resulting type after applying the - operator.
source§

fn sub(self, other: Point) -> <Point as Sub<Point>>::Output

Performs the - operation. Read more
source§

impl TextDimension for Point

source§

fn from_text_summary(summary: &TextSummary) -> Point

source§

fn add_assign(&mut self, other: &Point)

source§

impl ToDisplayPoint for Point

source§

impl ToOffset for Point

source§

fn to_offset(&self, snapshot: &BufferSnapshot) -> usize

source§

impl ToOffset for Point

source§

fn to_offset<'a>(&self, snapshot: &MultiBufferSnapshot) -> usize

source§

impl ToPoint for Point

source§

impl ToPoint for Point

source§

impl ToPointUtf16 for Point

source§

impl ToPointUtf16 for Point

source§

impl Copy for Point

source§

impl Eq for Point

source§

impl StructuralEq for Point

source§

impl StructuralPartialEq for Point

Auto Trait Implementations§

§

impl RefUnwindSafe for Point

§

impl Send for Point

§

impl Sync for Point

§

impl Unpin for Point

§

impl UnwindSafe for Point

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<Q, K> Comparable<K> for Qwhere Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
source§

impl<T> DynClone for Twhere T: Clone,

source§

fn __clone_box(&self, _: Private) -> *mut ()

§

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

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,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<S> FromSample<S> for S

§

fn from_sample_(s: S) -> S

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IsDefault for Twhere T: Default + PartialEq<T> + Copy,

source§

fn is_default(&self) -> bool

Checks that type has a default value.
§

impl<K> MapSeekTarget<K> for Kwhere K: Debug + Ord,

§

fn cmp_cursor(&self, cursor_location: &K) -> Ordering

§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> ResetDiscriminant<T> for Twhere T: Copy,

§

fn discriminant(&self) -> T

Value based on which equality for the reset will be determined.
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<'a, S, D1, D2> SeekTarget<'a, S, (D1, D2)> for D1where S: Summary, D1: SeekTarget<'a, S, D1> + Dimension<'a, S>, D2: Dimension<'a, S>,

§

fn cmp( &self, cursor_location: &(D1, D2), cx: &<S as Summary>::Context ) -> Ordering

§

impl<'a, S, D> SeekTarget<'a, S, D> for Dwhere S: Summary, D: Dimension<'a, S> + Ord,

§

fn cmp(&self, cursor_location: &D, _: &<S as Summary>::Context) -> Ordering

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T, U> ToSample<U> for Twhere U: FromSample<T>,

§

fn to_sample_(self) -> U

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
§

impl<S, T> Duplex<S> for Twhere T: FromSample<S> + ToSample<S>,