pub struct TextDecorationCollection { /* private fields */ }Expand description
An independently managed collection of TextDecorations.
This is the GPUI Component counterpart of Monaco’s
IEditorDecorationsCollection.
Implementations§
Source§impl TextDecorationCollection
impl TextDecorationCollection
Sourcepub fn set(&self, decorations: Vec<TextDecoration>, cx: &mut App)
pub fn set(&self, decorations: Vec<TextDecoration>, cx: &mut App)
Replace all decorations in this collection.
This corresponds to Monaco’s
IEditorDecorationsCollection.set.
Sourcepub fn append(&self, decorations: Vec<TextDecoration>, cx: &mut App)
pub fn append(&self, decorations: Vec<TextDecoration>, cx: &mut App)
Add decorations to this collection.
This corresponds to Monaco’s
IEditorDecorationsCollection.append.
Sourcepub fn clear(&self, cx: &mut App)
pub fn clear(&self, cx: &mut App)
Remove all decorations from this collection.
This corresponds to Monaco’s
IEditorDecorationsCollection.clear.
Sourcepub fn get_ranges(&self, cx: &App) -> Vec<Range<usize>>
pub fn get_ranges(&self, cx: &App) -> Vec<Range<usize>>
Return the UTF-8 byte ranges in this collection.
This corresponds to Monaco’s
IEditorDecorationsCollection.getRanges.
Trait Implementations§
Source§impl Clone for TextDecorationCollection
impl Clone for TextDecorationCollection
Source§fn clone(&self) -> TextDecorationCollection
fn clone(&self) -> TextDecorationCollection
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 moreAuto Trait Implementations§
impl !RefUnwindSafe for TextDecorationCollection
impl !UnwindSafe for TextDecorationCollection
impl Forget for TextDecorationCollection
impl Freeze for TextDecorationCollectionwhere
NonZero<u32>: Freeze,
*const (): Freeze,
*const ArcInner<RwLock<RawRwLock, EntityRefCounts>> is !null: Freeze,
PhantomData<fn(InputBaseState<EditorMode>) -> InputBaseState<EditorMode>>: Freeze,
impl Move for TextDecorationCollection
impl Send for TextDecorationCollection
impl Sync for TextDecorationCollection
impl Unpin for TextDecorationCollection
impl UnsafeUnpin for TextDecorationCollectionwhere
NonZeroU32Inner: UnsafeUnpin,
*const (): UnsafeUnpin,
*const ArcInner<RwLock<RawRwLock, EntityRefCounts>> is !null: UnsafeUnpin,
PhantomData<fn(InputBaseState<EditorMode>) -> InputBaseState<EditorMode>>: UnsafeUnpin,
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more