Struct uvls::ide::inlays::InlayHandler
source · pub struct InlayHandler {
source: Arc<Mutex<InlaySource>>,
tx: Sender<InlayEvent>,
}
Expand description
Inlays are managed as a global token state, there can only be 1 inlay source to keep things simple, inlays are computed asynchronously. Both configurations and webview can provide them as a SMT-Model
Fields§
§source: Arc<Mutex<InlaySource>>
§tx: Sender<InlayEvent>
Implementations§
source§impl InlayHandler
impl InlayHandler
pub fn new(client: Client) -> Self
pub fn is_active(&self, source: InlaySource) -> bool
pub async fn set_source(&self, source: InlaySource)
pub async fn maybe_publish<F: FnOnce() -> Arc<OwnedSMTModel>>( &self, source: InlaySource, timestamp: Instant, f: F, )
pub async fn maybe_reset(&self, source: InlaySource)
pub async fn get(&self, uri: &Url, span: Range<usize>) -> Option<Vec<InlayHint>>
Trait Implementations§
source§impl Clone for InlayHandler
impl Clone for InlayHandler
source§fn clone(&self) -> InlayHandler
fn clone(&self) -> InlayHandler
Returns a copy 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 InlayHandler
impl !RefUnwindSafe for InlayHandler
impl Send for InlayHandler
impl Sync for InlayHandler
impl Unpin for InlayHandler
impl !UnwindSafe for InlayHandler
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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