pub struct SelectableSpan {
pub id: SelectionId,
pub text: String,
pub source_range: Range<usize>,
pub screen_area: Rect,
pub group: Option<SelectionGroup>,
pub source_id: WidgetId,
pub logical_range: TextRange,
pub copyable: bool,
pub copy_transform: Option<CopyTransform>,
}Fields§
§id: SelectionId§text: String§source_range: Range<usize>§screen_area: Rect§group: Option<SelectionGroup>§source_id: WidgetId§logical_range: TextRange§copyable: bool§copy_transform: Option<CopyTransform>Implementations§
Source§impl SelectableSpan
impl SelectableSpan
pub fn new( id: impl Into<SelectionId>, text: impl Into<String>, source_range: Range<usize>, screen_area: Rect, ) -> Self
pub fn from_logical( id: impl Into<SelectionId>, source_id: impl Into<WidgetId>, screen_area: Rect, logical_range: TextRange, text: impl Into<String>, ) -> Self
pub fn with_group(self, group: impl Into<SelectionGroup>) -> Self
pub fn with_source_id(self, source_id: impl Into<WidgetId>) -> Self
pub fn with_logical_range(self, range: TextRange) -> Self
pub fn with_copyable(self, copyable: bool) -> Self
pub fn with_copy_transform(self, transform: CopyTransform) -> Self
Trait Implementations§
Source§impl Clone for SelectableSpan
impl Clone for SelectableSpan
Source§fn clone(&self) -> SelectableSpan
fn clone(&self) -> SelectableSpan
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 SelectableSpan
impl Debug for SelectableSpan
impl Eq for SelectableSpan
Source§impl PartialEq for SelectableSpan
impl PartialEq for SelectableSpan
Source§fn eq(&self, other: &SelectableSpan) -> bool
fn eq(&self, other: &SelectableSpan) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SelectableSpan
Auto Trait Implementations§
impl Freeze for SelectableSpan
impl RefUnwindSafe for SelectableSpan
impl Send for SelectableSpan
impl Sync for SelectableSpan
impl Unpin for SelectableSpan
impl UnsafeUnpin for SelectableSpan
impl UnwindSafe for SelectableSpan
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