pub struct SelectionState {
pub range: Option<RangeData>,
}Expand description
Selection の純粋状態管理
Fields§
§range: Option<RangeData>Implementations§
Source§impl SelectionState
impl SelectionState
pub fn new() -> Self
pub fn range_count(&self) -> usize
pub fn is_collapsed(&self) -> bool
pub fn selection_type(&self) -> SelectionType
pub fn anchor_point(&self) -> Option<BoundaryPoint>
pub fn focus_point(&self) -> Option<BoundaryPoint>
pub fn add_range(&mut self, range: RangeData)
pub fn remove_range(&mut self)
pub fn remove_all_ranges(&mut self)
pub fn collapse(&mut self, point: BoundaryPoint)
pub fn collapse_to_start(&mut self)
pub fn collapse_to_end(&mut self)
Trait Implementations§
Source§impl Clone for SelectionState
impl Clone for SelectionState
Source§fn clone(&self) -> SelectionState
fn clone(&self) -> SelectionState
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 moreimpl Copy for SelectionState
Source§impl Debug for SelectionState
impl Debug for SelectionState
Source§impl Default for SelectionState
impl Default for SelectionState
Source§fn default() -> SelectionState
fn default() -> SelectionState
Returns the “default value” for a type. Read more
impl Eq for SelectionState
Source§impl PartialEq for SelectionState
impl PartialEq for SelectionState
impl StructuralPartialEq for SelectionState
Auto Trait Implementations§
impl Freeze for SelectionState
impl RefUnwindSafe for SelectionState
impl Send for SelectionState
impl Sync for SelectionState
impl Unpin for SelectionState
impl UnsafeUnpin for SelectionState
impl UnwindSafe for SelectionState
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§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 Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.