pub struct LanguageState {
pub failed: Option<String>,
/* private fields */
}Expand description
Per-language mutable state — one per language, guarded by its own Mutex.
The outer LspMultiplexer holds one Arc<Mutex<LanguageState>> per language.
Multiple tasks can hold different language locks concurrently.
Fields§
§failed: Option<String>Set when the language has permanently failed (too many crashes).
Implementations§
Source§impl LanguageState
impl LanguageState
Sourcepub fn session_mut(&mut self) -> Option<&mut LspSession>
pub fn session_mut(&mut self) -> Option<&mut LspSession>
Get a mutable reference to any active session for this language.
Auto Trait Implementations§
impl Freeze for LanguageState
impl !RefUnwindSafe for LanguageState
impl Send for LanguageState
impl Sync for LanguageState
impl Unpin for LanguageState
impl UnsafeUnpin for LanguageState
impl !UnwindSafe for LanguageState
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> 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