pub struct Limits { /* private fields */ }Expand description
Backend names to their machine-wide slot counts; a backend without an entry is unlimited.
Implementations§
Source§impl Limits
impl Limits
Sourcepub fn read(state: &Path) -> Result<Self, String>
pub fn read(state: &Path) -> Result<Self, String>
Read $STATE/limits.json. No file means no limits; a file that is not a regular file,
is not valid, names an unknown backend or a limit outside 1–100000, or declares
agentSessions bounds out of order is an error.
Sourcepub fn limit(&self, backend: Backend) -> Option<u32>
pub fn limit(&self, backend: Backend) -> Option<u32>
The slot count of a parsed backend; None when it is unlimited.
pub fn backends(&self) -> &BTreeMap<Backend, u32>
pub fn agent_sessions(&self) -> AgentSessions
Trait Implementations§
impl Eq for Limits
impl StructuralPartialEq for Limits
Auto Trait Implementations§
impl Freeze for Limits
impl RefUnwindSafe for Limits
impl Send for Limits
impl Sync for Limits
impl Unpin for Limits
impl UnsafeUnpin for Limits
impl UnwindSafe for Limits
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.