pub struct State {
pub data: StateData,
/* private fields */
}
Expand description
A state is like a small configuration, like a profile
Fields§
§data: StateData
Implementations§
Source§impl State
impl State
pub fn new( id: u8, extensions_manager: ExtensionsManager, persistor: Box<dyn Persistor + Send>, ) -> Self
Sourcepub fn get_fs_by_name(
&self,
filesystem: &str,
) -> Option<Arc<Mutex<Box<dyn Filesystem + Send>>>>
pub fn get_fs_by_name( &self, filesystem: &str, ) -> Option<Arc<Mutex<Box<dyn Filesystem + Send>>>>
Retrieve the specified filesystem by the given name
pub fn has_token(&self, token: &str) -> bool
Sourcepub async fn run_extensions(&self)
pub async fn run_extensions(&self)
Run all the extensions in the manager
Sourcepub fn notify_extensions(&self, message: ExtensionMessages)
pub fn notify_extensions(&self, message: ExtensionMessages)
Notify all the extensions in a state about a message, asynchronously and independently
Sourcepub fn get_ext_info_by_id(&self, ext_id: &str) -> Result<ManifestInfo, Errors>
pub fn get_ext_info_by_id(&self, ext_id: &str) -> Result<ManifestInfo, Errors>
Try to retrieve info about a perticular loaded extension
Sourcepub fn get_ext_run_info_by_id(
&self,
ext_id: &str,
) -> Result<ExtensionInfo, Errors>
pub fn get_ext_run_info_by_id( &self, ext_id: &str, ) -> Result<ExtensionInfo, Errors>
Try to retrieve info about a perticular loaded extension
Sourcepub fn get_ext_list_by_id(&self) -> Vec<String>
pub fn get_ext_list_by_id(&self) -> Vec<String>
Return the list of loaded extensions
pub async fn update(&mut self, new_data: StateData)
pub async fn register_language_servers( &mut self, language_servers: HashMap<String, LanguageServer>, )
pub async fn get_all_language_servers(&self) -> Vec<LanguageServer>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for State
impl !RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl !UnwindSafe for State
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