sync_ls

Enum ServiceState

Source
pub enum ServiceState<'a, A, S> {
    Uninitialized(Option<&'a mut A>),
    Ready(&'a mut S),
}
Expand description

An enum to represent the state of the language server.

Variants§

§

Uninitialized(Option<&'a mut A>)

The service is uninitialized.

§

Ready(&'a mut S)

The service is initializing.

Implementations§

Source§

impl<A, S> ServiceState<'_, A, S>

Source

pub fn ready(&mut self) -> Option<&mut S>

Converts the state to an option holding the ready service.

Auto Trait Implementations§

§

impl<'a, A, S> Freeze for ServiceState<'a, A, S>

§

impl<'a, A, S> RefUnwindSafe for ServiceState<'a, A, S>

§

impl<'a, A, S> Send for ServiceState<'a, A, S>
where S: Send, A: Send,

§

impl<'a, A, S> Sync for ServiceState<'a, A, S>
where S: Sync, A: Sync,

§

impl<'a, A, S> Unpin for ServiceState<'a, A, S>

§

impl<'a, A, S> !UnwindSafe for ServiceState<'a, A, S>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> MaybeSendSync for T
where T: Send + Sync,