pub struct HelpRequest {
pub agent: AgentName,
pub run: RunId,
pub itinerary: ItineraryId,
pub blocker: Blocker,
pub summary: String,
pub detail: String,
pub fatal: bool,
pub at: Timestamp,
pub resolved_at: Option<Timestamp>,
}Expand description
One agent asking a human for something.
Fields§
§agent: AgentNameWho is asking.
run: RunIdThe run that raised it.
itinerary: ItineraryIdThe chain it belonged to.
blocker: BlockerWhat kind of thing is in the way.
summary: StringOne line, for a list.
detail: StringThe whole explanation: what was tried, what happened, what is needed.
fatal: boolWhether this stopped the work or merely limited it.
The distinction matters and is easy to lose. An agent can finish its task and still have been unable to check something — that is worth reporting, and it is not an outage.
at: TimestampWhen it was raised.
resolved_at: Option<Timestamp>When a human marked it dealt with.
Implementations§
Source§impl HelpRequest
impl HelpRequest
Sourcepub fn new(
agent: AgentName,
run: RunId,
itinerary: ItineraryId,
blocker: Blocker,
summary: impl Into<String>,
detail: impl Into<String>,
at: Timestamp,
) -> Self
pub fn new( agent: AgentName, run: RunId, itinerary: ItineraryId, blocker: Blocker, summary: impl Into<String>, detail: impl Into<String>, at: Timestamp, ) -> Self
Records a request.
Sourcepub fn is_same_ask_as(&self, other: &Self) -> bool
pub fn is_same_ask_as(&self, other: &Self) -> bool
Returns true when this asks for the same thing as other.
Used to keep a recurring blocker from being filed on every run. A factory whose credentials expired does not need forty identical requests; it needs one, and a count.
Trait Implementations§
Source§impl Clone for HelpRequest
impl Clone for HelpRequest
Source§impl Debug for HelpRequest
impl Debug for HelpRequest
Source§impl<'de> Deserialize<'de> for HelpRequest
impl<'de> Deserialize<'de> for HelpRequest
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for HelpRequest
impl PartialEq for HelpRequest
Source§impl Serialize for HelpRequest
impl Serialize for HelpRequest
impl StructuralPartialEq for HelpRequest
Auto Trait Implementations§
impl Freeze for HelpRequest
impl RefUnwindSafe for HelpRequest
impl Send for HelpRequest
impl Sync for HelpRequest
impl Unpin for HelpRequest
impl UnsafeUnpin for HelpRequest
impl UnwindSafe for HelpRequest
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