pub(super) struct LspDispatch<'l, L: Lsp + 'l> {
connection: Arc<Connection>,
lsp: L,
notification_arms: Vec<Box<dyn NotificationArm<L> + 'l>>,
request_arms: Vec<Box<dyn RequestArm<L> + 'l>>,
}Fields§
§connection: Arc<Connection>§lsp: L§notification_arms: Vec<Box<dyn NotificationArm<L> + 'l>>§request_arms: Vec<Box<dyn RequestArm<L> + 'l>>Implementations§
Source§impl<'l, L: Lsp + 'l> LspDispatch<'l, L>
impl<'l, L: Lsp + 'l> LspDispatch<'l, L>
pub fn new(connection: Connection, lsp: L) -> Self
pub fn on_notification<N>(
self,
execute: impl Fn(&mut L, &mut dyn Editor<L>, N::Params) -> Fallible<()> + 'l,
) -> Selfwhere
N: Notification + 'l,
pub fn on_request<R>(
self,
execute: impl Fn(&mut L, &mut dyn Editor<L>, R::Params) -> Fallible<R::Result> + 'l,
) -> Selfwhere
R: Request + 'l,
Auto Trait Implementations§
impl<'l, L> Freeze for LspDispatch<'l, L>where
L: Freeze,
impl<'l, L> !RefUnwindSafe for LspDispatch<'l, L>
impl<'l, L> !Send for LspDispatch<'l, L>
impl<'l, L> !Sync for LspDispatch<'l, L>
impl<'l, L> Unpin for LspDispatch<'l, L>where
L: Unpin,
impl<'l, L> UnsafeUnpin for LspDispatch<'l, L>where
L: UnsafeUnpin,
impl<'l, L> !UnwindSafe for LspDispatch<'l, L>
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<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