pub struct Assignee {
pub op: String,
pub desc: String,
pub gen: u64,
}Expand description
Who currently holds one slot of a Run — the model’s Assignee
({ op, desc, gen }), persisted as one value of the
RunRecord::current map.
A “slot” is a Blueprint-declared Operator seat: the operator_ref an
agent names (Blueprint.operators[].name). A Blueprint may declare
several, so a Run has as many slots as its Blueprint declares, each
with its own holder over time.
Invariants this type carries (model §4.3):
- A1
|Run.current| ≤ 1per slot — expressed as the map keyed by slot onRunRecord::current: one key cannot hold two values, so a seat cannot have two holders. The slot is the map key, never a field of this struct. - A3
Self::genis immutable for the lifetime of an instance. Re-assignment never mutates an existingAssignee; the store mints a fresh instance with the next generation (Q3). Nothing in this crate takes&mut Assignee. - A9
Self::descis mandatory. The store rejects an empty (or whitespace-only)descwithRunStoreError::AssigneeDescRequired; the HTTP layer maps that to400. The store itself never decides a status code. - A10 this is the one place a slot’s current holder is recorded and the one place it is read from — the destination is not baked into any sibling field.
The Assignee does not cross the SAP boundary (model §4.7 T1): the
primitives below the boundary carry an operator, never an assignee or
a generation.
Fields§
§op: StringWho holds the slot — the model’s OperatorId, which is the key
space of the engine’s operator registry. Session ids (S-<hex>)
and role aliases (main-ai) share that one key space (the WS login
path registers both), so this stays a plain String rather than
narrowing to a session id.
desc: StringWhy this holder was assigned — the human-readable record of the
assignment. Required (A9); an empty value is rejected at the
store boundary rather than stored as "".
gen: u64The generation stamped on this holder at acquire time (A4:
G after the increment). Immutable for the lifetime of the
instance (A3) — a later acquire produces a NEW Assignee with
a higher gen instead of rewriting this one.
G is a single counter per Run, not per slot: an assignment to
any slot advances the one counter, so two holders of different
slots can be ordered against each other by gen alone.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Assignee
impl<'de> Deserialize<'de> for Assignee
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>,
impl Eq for Assignee
Source§impl JsonSchema for Assignee
impl JsonSchema for Assignee
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreimpl StructuralPartialEq for Assignee
Auto Trait Implementations§
impl Freeze for Assignee
impl RefUnwindSafe for Assignee
impl Send for Assignee
impl Sync for Assignee
impl Unpin for Assignee
impl UnsafeUnpin for Assignee
impl UnwindSafe for Assignee
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
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
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> 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