pub struct Limits { /* private fields */ }Expand description
Backend names to their machine-wide slot counts; a backend without an entry is unlimited. It serializes as the limits in force, in the file’s own field names.
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 set_signoff_idle_grace(
state: &Path,
grace: Duration,
) -> Result<Self, String>
pub fn set_signoff_idle_grace( state: &Path, grace: Duration, ) -> Result<Self, String>
Save grace as the idle grace of the Runs started from now on, keeping every other
declared limit as written, and return the limits that are now in force. A file that does
not read is not overwritten.
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
Sourcepub fn signoff_idle_grace(&self) -> Duration
pub fn signoff_idle_grace(&self) -> Duration
How long a Run with nothing but unclaimed sign-offs left stays open before it ends.
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.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> IntoToolOutput for Twhere
T: Serialize + 'static,
impl<T> IntoToolOutput for Twhere
T: Serialize + 'static,
Source§fn into_tool_output(self) -> Result<ToolOutput, ToolExecutionError>
fn into_tool_output(self) -> Result<ToolOutput, ToolExecutionError>
Convert this value without routing structured data through a string.