pub struct AgentModeContext {
pub active: bool,
}Expand description
Shared process-level agent-mode context.
Fields§
§active: boolWhether agent mode is active for the current process.
Implementations§
Source§impl AgentModeContext
impl AgentModeContext
Sourcepub fn from_tokens(
presented: Option<String>,
expected: Option<String>,
) -> AgentModeContext
pub fn from_tokens( presented: Option<String>, expected: Option<String>, ) -> AgentModeContext
Construct an agent-mode context from edge-read token values.
Agent mode is active only when both the presented and expected tokens
are present and equal. Reading the tokens from the environment is the
binary edge’s responsibility (REPO_INVARIANTS.md #5).
Trait Implementations§
Source§impl Clone for AgentModeContext
impl Clone for AgentModeContext
Source§fn clone(&self) -> AgentModeContext
fn clone(&self) -> AgentModeContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for AgentModeContext
Source§impl Debug for AgentModeContext
impl Debug for AgentModeContext
Source§impl Default for AgentModeContext
impl Default for AgentModeContext
Source§fn default() -> AgentModeContext
fn default() -> AgentModeContext
Returns the “default value” for a type. Read more
impl Eq for AgentModeContext
Source§impl PartialEq for AgentModeContext
impl PartialEq for AgentModeContext
Source§fn eq(&self, other: &AgentModeContext) -> bool
fn eq(&self, other: &AgentModeContext) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for AgentModeContext
Auto Trait Implementations§
impl Freeze for AgentModeContext
impl RefUnwindSafe for AgentModeContext
impl Send for AgentModeContext
impl Sync for AgentModeContext
impl Unpin for AgentModeContext
impl UnsafeUnpin for AgentModeContext
impl UnwindSafe for AgentModeContext
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