pub struct GateEvent {
pub gate_id: GateId,
pub kind: GateEventKind,
pub timestamp: Timestamp,
}Expand description
Audit trail entry for HITL gate events.
Every gate interaction is recorded for compliance and debugging.
Fields§
§gate_id: GateIdThe gate this event belongs to.
kind: GateEventKindWhat happened.
timestamp: TimestampWhen it happened.
Implementations§
Source§impl GateEvent
impl GateEvent
Sourcepub fn requested(
gate_id: GateId,
proposal_id: ProposalId,
agent_id: String,
) -> GateEvent
pub fn requested( gate_id: GateId, proposal_id: ProposalId, agent_id: String, ) -> GateEvent
Create a “requested” event.
Sourcepub fn from_decision(decision: &GateDecision) -> GateEvent
pub fn from_decision(decision: &GateDecision) -> GateEvent
Create an event from a decision.
Sourcepub fn timed_out(gate_id: GateId, action_taken: TimeoutAction) -> GateEvent
pub fn timed_out(gate_id: GateId, action_taken: TimeoutAction) -> GateEvent
Create a “timed out” event.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for GateEvent
impl<'de> Deserialize<'de> for GateEvent
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<GateEvent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<GateEvent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for GateEvent
impl Serialize for GateEvent
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for GateEvent
impl RefUnwindSafe for GateEvent
impl Send for GateEvent
impl Sync for GateEvent
impl Unpin for GateEvent
impl UnsafeUnpin for GateEvent
impl UnwindSafe for GateEvent
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