pub struct Deputy {
pub brief: String,
pub agent: String,
pub seat: Option<SeatState>,
pub starts: u32,
}Expand description
The follow-up seat a conductor question hands its wait to.
The conductor itself never waits (see crate::conduct), so a free-text
reply to its question would reach nobody. A deputy is a seat of its own -
keyed deputy-<question id>, never the conductor’s shared seat - that
inherits what the conductor knew about this one question (Deputy::brief)
and blocks on it with magi ask --wait. Persisted on the question so a
restarted daemon resumes the same CLI conversation instead of assuming it.
Written only through Questions::update: the owner’s say and answer land
on the same file.
Fields§
§brief: StringWhy the question was asked, what each choice leads to: the conductor’s context for this one question, handed to the deputy in its prompt.
agent: StringThe agent that holds the seat. Empty until the first start.
seat: Option<SeatState>The deputy’s own conversation. None until the first start.
starts: u32How many times a deputy turn was started for this question. Never reset by a restart, so a deputy that keeps dying is bounded.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Deputy
impl<'de> Deserialize<'de> for Deputy
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 Deputy
impl StructuralPartialEq for Deputy
Auto Trait Implementations§
impl Freeze for Deputy
impl RefUnwindSafe for Deputy
impl Send for Deputy
impl Sync for Deputy
impl Unpin for Deputy
impl UnsafeUnpin for Deputy
impl UnwindSafe for Deputy
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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