pub struct LineDecorationCollection { /* private fields */ }Expand description
An independently managed collection of line decorations, supplied by a
LineDecorationProvider.
Clones address the same collection. Dropping a handle does not clear it; use
Self::clear to stop painting it or Self::dispose to release it permanently.
Operations on a disposed collection or a dropped editor are harmless no-ops.
Implementations§
Source§impl LineDecorationCollection
impl LineDecorationCollection
Sourcepub fn set_provider(
&self,
provider: Rc<dyn LineDecorationProvider>,
cx: &mut App,
)
pub fn set_provider( &self, provider: Rc<dyn LineDecorationProvider>, cx: &mut App, )
Replace this collection’s provider. The next frame asks the new one.
Sourcepub fn clear(&self, cx: &mut App)
pub fn clear(&self, cx: &mut App)
Stop painting this collection without invalidating its handles.
Sourcepub fn dispose(&self, cx: &mut App)
pub fn dispose(&self, cx: &mut App)
Release this collection, invalidating all of its cloned handles.
Sourcepub fn has_provider(&self, cx: &App) -> bool
pub fn has_provider(&self, cx: &App) -> bool
Whether this collection has a provider; false once cleared, disposed or dropped.
Trait Implementations§
Source§impl Clone for LineDecorationCollection
impl Clone for LineDecorationCollection
Auto Trait Implementations§
impl !RefUnwindSafe for LineDecorationCollection
impl !UnwindSafe for LineDecorationCollection
impl Forget for LineDecorationCollection
impl Freeze for LineDecorationCollectionwhere
NonZero<u32>: Freeze,
*const (): Freeze,
*const ArcInner<RwLock<RawRwLock, EntityRefCounts>> is !null: Freeze,
PhantomData<fn(InputBaseState<EditorMode>) -> InputBaseState<EditorMode>>: Freeze,
impl Move for LineDecorationCollection
impl Send for LineDecorationCollection
impl Sync for LineDecorationCollection
impl Unpin for LineDecorationCollection
impl UnsafeUnpin for LineDecorationCollectionwhere
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