pub struct ServerStartConcurrency(/* private fields */);Expand description
How many LSP servers may be starting at the same time.
A fixed default keeps a generated configuration machine-independent.
§Examples
use mcpls_core::config::ServerStartConcurrency;
assert!(ServerStartConcurrency::new(0).is_err());
assert_eq!(ServerStartConcurrency::new(2).unwrap().get(), 2);
assert_eq!(ServerStartConcurrency::default(), ServerStartConcurrency::DEFAULT);Implementations§
Source§impl ServerStartConcurrency
impl ServerStartConcurrency
Sourcepub const fn new(limit: usize) -> Result<Self, InvalidServerStartConcurrency>
pub const fn new(limit: usize) -> Result<Self, InvalidServerStartConcurrency>
Trait Implementations§
Source§impl Clone for ServerStartConcurrency
impl Clone for ServerStartConcurrency
impl Copy for ServerStartConcurrency
Source§impl Debug for ServerStartConcurrency
impl Debug for ServerStartConcurrency
Source§impl Default for ServerStartConcurrency
impl Default for ServerStartConcurrency
Source§impl<'de> Deserialize<'de> for ServerStartConcurrency
impl<'de> Deserialize<'de> for ServerStartConcurrency
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ServerStartConcurrency
Source§impl From<ServerStartConcurrency> for usize
impl From<ServerStartConcurrency> for usize
Source§fn from(value: ServerStartConcurrency) -> Self
fn from(value: ServerStartConcurrency) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ServerStartConcurrency
impl PartialEq for ServerStartConcurrency
Source§impl Serialize for ServerStartConcurrency
impl Serialize for ServerStartConcurrency
impl StructuralPartialEq for ServerStartConcurrency
Auto Trait Implementations§
impl Freeze for ServerStartConcurrency
impl RefUnwindSafe for ServerStartConcurrency
impl Send for ServerStartConcurrency
impl Sync for ServerStartConcurrency
impl Unpin for ServerStartConcurrency
impl UnsafeUnpin for ServerStartConcurrency
impl UnwindSafe for ServerStartConcurrency
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.