pub struct EditorExtras { /* private fields */ }Expand description
What a code editor adds on top of multi-line text: language features.
Trait Implementations§
Source§impl Default for EditorExtras
impl Default for EditorExtras
Source§impl InputExtras for EditorExtras
What a code editor exposes to the renderer. See crate::input::InputExtras.
impl InputExtras for EditorExtras
What a code editor exposes to the renderer. See crate::input::InputExtras.
Source§fn decoration_layers(&self) -> Vec<&[TextDecoration]>
fn decoration_layers(&self) -> Vec<&[TextDecoration]>
Decoration ranges to paint, innermost collection first.
Source§fn range_decorations(&self, ranges: &[Range<usize>]) -> Vec<&RangeDecoration>
fn range_decorations(&self, ranges: &[Range<usize>]) -> Vec<&RangeDecoration>
Geometric decorations intersecting visible, non-folded buffer spans.
Source§fn gutter_decorations_width(&self) -> Option<Pixels>
fn gutter_decorations_width(&self) -> Option<Pixels>
Return the gutter decoration strip width, or
None when no gutter
collection exists.Source§fn gutter_decorations(&self, range: Range<usize>) -> Vec<&GutterDecoration>
fn gutter_decorations(&self, range: Range<usize>) -> Vec<&GutterDecoration>
Return the gutter decorations that touch a UTF-8 byte range, in paint
order. An empty decoration touches the range when it lies inside it.
Source§fn overview_ruler_decorations(&self) -> Vec<&OverviewRulerDecoration>
fn overview_ruler_decorations(&self) -> Vec<&OverviewRulerDecoration>
Return all overview ruler decorations in paint order.
Source§fn overview_ruler_revision(&self) -> u64
fn overview_ruler_revision(&self) -> u64
A number that changes whenever an overview ruler collection is created,
replaced, extended, cleared or released.
Source§fn semantic_token_styles(
&self,
text: &Rope,
range: &Range<usize>,
resolver: &dyn HighlightStyleResolver,
) -> Vec<(Range<usize>, HighlightStyle)>
fn semantic_token_styles( &self, text: &Rope, range: &Range<usize>, resolver: &dyn HighlightStyleResolver, ) -> Vec<(Range<usize>, HighlightStyle)>
Semantic-token styles for a visible range, when an LSP supplies them.
Source§fn document_color_swatches(
&self,
text: &Rope,
range: &Range<usize>,
) -> Vec<(Range<usize>, Hsla)>
fn document_color_swatches( &self, text: &Rope, range: &Range<usize>, ) -> Vec<(Range<usize>, Hsla)>
Document colours to paint as swatches, when an LSP supplies them.
Source§fn hover_symbol_range(&self) -> Option<Range<usize>>
fn hover_symbol_range(&self) -> Option<Range<usize>>
The symbol range the hover popover is anchored to.
Source§fn inline_completion_item(&self) -> Option<&InlineCompletionItem>
fn inline_completion_item(&self) -> Option<&InlineCompletionItem>
The inline completion to paint as ghost text.
What this mode can offer its context menu: go-to-definition, code actions.
Auto Trait Implementations§
impl !RefUnwindSafe for EditorExtras
impl !Send for EditorExtras
impl !Sync for EditorExtras
impl !UnwindSafe for EditorExtras
impl Forget for EditorExtras
impl Freeze for EditorExtraswhere
*const RcInner<dyn CompletionProvider> is !null: Freeze,
PhantomData<RcInner<dyn CompletionProvider>>: Freeze,
*const u8 is !null: Freeze,
PhantomData<Rc<dyn CodeActionProvider>>: Freeze,
*const RcInner<dyn HoverProvider> is !null: Freeze,
PhantomData<RcInner<dyn HoverProvider>>: Freeze,
*const RcInner<dyn DefinitionProvider> is !null: Freeze,
PhantomData<RcInner<dyn DefinitionProvider>>: Freeze,
*const RcInner<dyn DocumentColorProvider> is !null: Freeze,
PhantomData<RcInner<dyn DocumentColorProvider>>: Freeze,
*const RcInner<dyn DocumentRangeSemanticTokensProvider> is !null: Freeze,
PhantomData<RcInner<dyn DocumentRangeSemanticTokensProvider>>: Freeze,
*const RcInner<dyn Fn(&ShowDocumentParams, &mut Window, &mut App) -> bool> is !null: Freeze,
PhantomData<RcInner<dyn Fn(&ShowDocumentParams, &mut Window, &mut App) -> bool>>: Freeze,
*const RcInner<dyn Fn(&str, &CompletionItem) -> Vec<Range<usize>>> is !null: Freeze,
PhantomData<RcInner<dyn Fn(&str, &CompletionItem) -> Vec<Range<usize>>>>: Freeze,
PhantomData<(Range, Hsla)>: Freeze,
PhantomData<(Range, SharedString)>: Freeze,
*const ErrorImpl is !null: Freeze,
*const () is !null: Freeze,
PhantomData<(Result<(), Error>, RunnableMeta)>: Freeze,
*const Task<Box<dyn Any + Sync + Send>> is !null: Freeze,
PhantomData<Task<Box<dyn Any + Sync + Send>>>: Freeze,
PhantomData<fn() -> Result<(), Error>>: Freeze,
*const ArcInner<Mutex<RawMutex, RendezvousState<Result<(), Error>>>> is !null: Freeze,
PhantomData<ArcInner<Mutex<RawMutex, RendezvousState<Result<(), Error>>>>>: Freeze,
PhantomData<((), RunnableMeta)>: Freeze,
PhantomData<fn()>: Freeze,
*const ArcInner<Mutex<RawMutex, RendezvousState<()>>> is !null: Freeze,
PhantomData<ArcInner<Mutex<RawMutex, RendezvousState<()>>>>: Freeze,
*const LeafNode<DecorationCollectionId, DecorationEntries<TextDecoration>> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(DecorationCollectionId, DecorationEntries<TextDecoration>)>>: Freeze,
*const LeafNode<DecorationCollectionId, DecorationEntries<RangeDecoration>> is !null: Freeze,
PhantomData<Box<(DecorationCollectionId, DecorationEntries<RangeDecoration>)>>: Freeze,
*const LeafNode<DecorationCollectionId, DecorationEntries<GutterDecoration>> is !null: Freeze,
PhantomData<Box<(DecorationCollectionId, DecorationEntries<GutterDecoration>)>>: Freeze,
*const LeafNode<DecorationCollectionId, DecorationEntries<OverviewRulerDecoration>> is !null: Freeze,
PhantomData<Box<(DecorationCollectionId, DecorationEntries<OverviewRulerDecoration>)>>: Freeze,
PhantomData<u8>: Freeze,
PhantomData<Value>: Freeze,
PhantomData<InlineCompletionItem>: Freeze,
PhantomData<(Result<InlineCompletionResponse, Error>, RunnableMeta)>: Freeze,
PhantomData<fn() -> Result<InlineCompletionResponse, Error>>: Freeze,
*const ArcInner<Mutex<RawMutex, RendezvousState<Result<InlineCompletionResponse, Error>>>> is !null: Freeze,
PhantomData<ArcInner<Mutex<RawMutex, RendezvousState<Result<InlineCompletionResponse, Error>>>>>: Freeze,
PhantomData<CompletionItem>: Freeze,
PhantomData<CodeActionItem>: Freeze,
PhantomData<MarkedString>: Freeze,
*const RcInner<Vec<LocationLink>> is !null: Freeze,
PhantomData<RcInner<Vec<LocationLink>>>: Freeze,
impl Move for EditorExtras
impl Unpin for EditorExtraswhere
Rc<dyn CompletionProvider>: Unpin,
*const u8 is !null: Unpin,
Rc<dyn CodeActionProvider>: Unpin,
Rc<dyn HoverProvider>: Unpin,
Rc<dyn DefinitionProvider>: Unpin,
Rc<dyn DocumentColorProvider>: Unpin,
Rc<dyn DocumentRangeSemanticTokensProvider>: Unpin,
Rc<dyn Fn(&ShowDocumentParams, &mut Window, &mut App) -> bool>: Unpin,
Rc<dyn Fn(&str, &CompletionItem) -> Vec<Range<usize>>>: Unpin,
&'static str: Unpin,
Arc<str>: Unpin,
*const ErrorImpl is !null: Unpin,
Task<Result<(), Error>, RunnableMeta>: Unpin,
Box<Task<Box<dyn Any + Sync + Send>>>: Unpin,
Arc<Mutex<RawMutex, RendezvousState<Result<(), Error>>>>: Unpin,
Task<(), RunnableMeta>: Unpin,
Arc<Mutex<RawMutex, RendezvousState<()>>>: Unpin,
*const LeafNode<DecorationCollectionId, DecorationEntries<TextDecoration>> is !null: Unpin,
Box<(DecorationCollectionId, DecorationEntries<TextDecoration>)>: Unpin,
*const LeafNode<DecorationCollectionId, DecorationEntries<RangeDecoration>> is !null: Unpin,
Box<(DecorationCollectionId, DecorationEntries<RangeDecoration>)>: Unpin,
*const LeafNode<DecorationCollectionId, DecorationEntries<GutterDecoration>> is !null: Unpin,
Box<(DecorationCollectionId, DecorationEntries<GutterDecoration>)>: Unpin,
*const LeafNode<DecorationCollectionId, DecorationEntries<OverviewRulerDecoration>> is !null: Unpin,
Box<(DecorationCollectionId, DecorationEntries<OverviewRulerDecoration>)>: Unpin,
Task<Result<InlineCompletionResponse, Error>, RunnableMeta>: Unpin,
Arc<Mutex<RawMutex, RendezvousState<Result<InlineCompletionResponse, Error>>>>: Unpin,
String: Unpin,
Capped: Unpin,
NonZero<u32>: Unpin,
Rc<Vec<LocationLink>>: Unpin,
impl UnsafeUnpin for EditorExtraswhere
*const RcInner<dyn CompletionProvider> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn CompletionProvider>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<Rc<dyn CodeActionProvider>>: UnsafeUnpin,
*const RcInner<dyn HoverProvider> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn HoverProvider>>: UnsafeUnpin,
*const RcInner<dyn DefinitionProvider> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn DefinitionProvider>>: UnsafeUnpin,
*const RcInner<dyn DocumentColorProvider> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn DocumentColorProvider>>: UnsafeUnpin,
*const RcInner<dyn DocumentRangeSemanticTokensProvider> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn DocumentRangeSemanticTokensProvider>>: UnsafeUnpin,
*const RcInner<dyn Fn(&ShowDocumentParams, &mut Window, &mut App) -> bool> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(&ShowDocumentParams, &mut Window, &mut App) -> bool>>: UnsafeUnpin,
*const RcInner<dyn Fn(&str, &CompletionItem) -> Vec<Range<usize>>> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(&str, &CompletionItem) -> Vec<Range<usize>>>>: UnsafeUnpin,
PhantomData<(Range, Hsla)>: UnsafeUnpin,
PhantomData<(Range, SharedString)>: UnsafeUnpin,
*const ErrorImpl is !null: UnsafeUnpin,
*const () is !null: UnsafeUnpin,
PhantomData<(Result<(), Error>, RunnableMeta)>: UnsafeUnpin,
*const Task<Box<dyn Any + Sync + Send>> is !null: UnsafeUnpin,
PhantomData<Task<Box<dyn Any + Sync + Send>>>: UnsafeUnpin,
PhantomData<fn() -> Result<(), Error>>: UnsafeUnpin,
*const ArcInner<Mutex<RawMutex, RendezvousState<Result<(), Error>>>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Mutex<RawMutex, RendezvousState<Result<(), Error>>>>>: UnsafeUnpin,
PhantomData<((), RunnableMeta)>: UnsafeUnpin,
PhantomData<fn()>: UnsafeUnpin,
*const ArcInner<Mutex<RawMutex, RendezvousState<()>>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Mutex<RawMutex, RendezvousState<()>>>>: UnsafeUnpin,
*const LeafNode<DecorationCollectionId, DecorationEntries<TextDecoration>> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(DecorationCollectionId, DecorationEntries<TextDecoration>)>>: UnsafeUnpin,
*const LeafNode<DecorationCollectionId, DecorationEntries<RangeDecoration>> is !null: UnsafeUnpin,
PhantomData<Box<(DecorationCollectionId, DecorationEntries<RangeDecoration>)>>: UnsafeUnpin,
*const LeafNode<DecorationCollectionId, DecorationEntries<GutterDecoration>> is !null: UnsafeUnpin,
PhantomData<Box<(DecorationCollectionId, DecorationEntries<GutterDecoration>)>>: UnsafeUnpin,
*const LeafNode<DecorationCollectionId, DecorationEntries<OverviewRulerDecoration>> is !null: UnsafeUnpin,
PhantomData<Box<(DecorationCollectionId, DecorationEntries<OverviewRulerDecoration>)>>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Value>: UnsafeUnpin,
PhantomData<InlineCompletionItem>: UnsafeUnpin,
PhantomData<(Result<InlineCompletionResponse, Error>, RunnableMeta)>: UnsafeUnpin,
PhantomData<fn() -> Result<InlineCompletionResponse, Error>>: UnsafeUnpin,
*const ArcInner<Mutex<RawMutex, RendezvousState<Result<InlineCompletionResponse, Error>>>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Mutex<RawMutex, RendezvousState<Result<InlineCompletionResponse, Error>>>>>: UnsafeUnpin,
PhantomData<CompletionItem>: UnsafeUnpin,
PhantomData<CodeActionItem>: UnsafeUnpin,
PhantomData<MarkedString>: UnsafeUnpin,
*const RcInner<Vec<LocationLink>> is !null: UnsafeUnpin,
PhantomData<RcInner<Vec<LocationLink>>>: 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
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().