#[repr(C)]pub struct SelectionId {
pub inner: u64,
}Expand description
Stable identifier for a cursor/selection within a MultiCursorState.
Uses a monotonic u64 counter (not UUID) so it is Copy and C-API friendly.
Each SelectionId is unique within the lifetime of the process.
Fields§
§inner: u64Implementations§
Source§impl SelectionId
impl SelectionId
Trait Implementations§
Source§impl Clone for SelectionId
impl Clone for SelectionId
Source§fn clone(&self) -> SelectionId
fn clone(&self) -> SelectionId
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 SelectionId
impl Debug for SelectionId
Source§impl Default for SelectionId
Note: Default generates a new unique ID (increments global counter),
rather than returning a zero/sentinel value.
impl Default for SelectionId
Note: Default generates a new unique ID (increments global counter),
rather than returning a zero/sentinel value.
Source§impl FromIterator<SelectionId> for SelectionIdVec
impl FromIterator<SelectionId> for SelectionIdVec
Source§fn from_iter<T>(iter: T) -> Selfwhere
T: IntoIterator<Item = SelectionId>,
fn from_iter<T>(iter: T) -> Selfwhere
T: IntoIterator<Item = SelectionId>,
Creates a value from an iterator. Read more
Source§impl Hash for SelectionId
impl Hash for SelectionId
Source§impl Ord for SelectionId
impl Ord for SelectionId
Source§fn cmp(&self, other: &SelectionId) -> Ordering
fn cmp(&self, other: &SelectionId) -> Ordering
1.21.0 (const: unstable) · 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 for SelectionId
impl PartialEq for SelectionId
Source§fn eq(&self, other: &SelectionId) -> bool
fn eq(&self, other: &SelectionId) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for SelectionId
impl PartialOrd for SelectionId
impl Copy for SelectionId
impl Eq for SelectionId
impl StructuralPartialEq for SelectionId
Auto Trait Implementations§
impl Freeze for SelectionId
impl RefUnwindSafe for SelectionId
impl Send for SelectionId
impl Sync for SelectionId
impl Unpin for SelectionId
impl UnsafeUnpin for SelectionId
impl UnwindSafe for SelectionId
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