pub struct PhantomText {
pub kind: PhantomTextKind,
pub col: usize,
pub affinity: Option<CursorAffinity>,
pub text: String,
pub font_size: Option<usize>,
pub fg: Option<Color>,
pub bg: Option<Color>,
pub under_line: Option<Color>,
}Expand description
PhantomText is for text that is not in the actual document, but should be rendered with it.
Ex: Inlay hints, IME text, error lens’ diagnostics, etc
Fields§
§kind: PhantomTextKindThe kind is currently used for sorting the phantom text on a line
col: usizeColumn on the line that the phantom text should be displayed at
affinity: Option<CursorAffinity>the affinity of cursor, e.g. for completion phantom text, we want the cursor always before the phantom text
text: String§font_size: Option<usize>§fg: Option<Color>§bg: Option<Color>§under_line: Option<Color>Trait Implementations§
Source§impl Clone for PhantomText
impl Clone for PhantomText
Source§fn clone(&self) -> PhantomText
fn clone(&self) -> PhantomText
Returns a duplicate of the value. Read more
1.0.0 · 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 Freeze for PhantomText
impl RefUnwindSafe for PhantomText
impl Send for PhantomText
impl Sync for PhantomText
impl Unpin for PhantomText
impl UnwindSafe for PhantomText
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,
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