sync_lsp/lifecycle/initialized.rs
1use crate::{Server, TypeProvider};
2use crate::connection::{Callback, EmptyParams};
3
4pub(crate) struct Initialized<T: TypeProvider>
5 (pub(crate) fn(&mut Server<T>));
6
7impl<T: TypeProvider> Initialized<T> {
8
9 pub(crate) const METHOD: &'static str = "initialized";
10
11 pub(crate) fn callback(&self) -> Callback<Server<T>> {
12 let Initialized(callback) = *self;
13 Callback::notification(move |server, _: EmptyParams| callback(server))
14 }
15}