Struct fyrox_ui::text_box::SelectionRange
source · pub struct SelectionRange {
pub begin: Position,
pub end: Position,
}Expand description
Defines a set of two positions in the text, that forms a specific range.
Fields§
§begin: PositionPosition of the beginning.
end: PositionPosition of the end.
Implementations§
source§impl SelectionRange
impl SelectionRange
sourcepub fn normalized(&self) -> SelectionRange
pub fn normalized(&self) -> SelectionRange
Creates a new range, that have its begin always before end. It could be useful in case if user selects a range right-to-left.
Trait Implementations§
source§impl Clone for SelectionRange
impl Clone for SelectionRange
source§fn clone(&self) -> SelectionRange
fn clone(&self) -> SelectionRange
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 SelectionRange
impl Debug for SelectionRange
source§impl PartialEq<SelectionRange> for SelectionRange
impl PartialEq<SelectionRange> for SelectionRange
source§fn eq(&self, other: &SelectionRange) -> bool
fn eq(&self, other: &SelectionRange) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Copy for SelectionRange
impl Eq for SelectionRange
impl StructuralEq for SelectionRange
impl StructuralPartialEq for SelectionRange
Auto Trait Implementations§
impl RefUnwindSafe for SelectionRange
impl Send for SelectionRange
impl Sync for SelectionRange
impl Unpin for SelectionRange
impl UnwindSafe for SelectionRange
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
source§impl<T> FieldValue for Twhere
T: 'static,
impl<T> FieldValue for Twhere T: 'static,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.