pub struct GateContext<'a> {
pub session_id: Option<&'a str>,
pub scope: Option<&'a RuntimeScope>,
pub state: &'a HashMap<String, Value>,
pub versions: &'a HashMap<String, u64>,
}Expand description
Read-only context handed to each gate at admission time.
It carries the cheap, always-available facts a gate needs to reason
about a proposal without reaching back into the Runtime (which would
create a borrow cycle, since gates are stored on the runtime). Gates
that need richer inputs — per-tool information-flow labels (A3/A4), the
timestamped multi-agent schedule (A5) — hold those as their own state,
captured when the gate is constructed.
Fields§
§session_id: Option<&'a str>The session the proposal executes under, if any. Lets a gate apply session-scoped rules on top of global ones, mirroring the per-session policy registries.
scope: Option<&'a RuntimeScope>The caller/tenant identity attached to this execution (car#187).
state: &'a HashMap<String, Value>A snapshot of shared state at admission time.
versions: &'a HashMap<String, u64>Per-key version counters for the same snapshot — the input the transactional / information-flow checks reason over.
Auto Trait Implementations§
impl<'a> Freeze for GateContext<'a>
impl<'a> RefUnwindSafe for GateContext<'a>
impl<'a> Send for GateContext<'a>
impl<'a> Sync for GateContext<'a>
impl<'a> Unpin for GateContext<'a>
impl<'a> UnsafeUnpin for GateContext<'a>
impl<'a> UnwindSafe for GateContext<'a>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more