pub struct Event {
pub name: String,
pub type_: EventType,
pub sendid: Option<String>,
pub origin: Option<String>,
pub origintype: Option<String>,
pub originverified: bool,
pub invokeid: Option<String>,
pub data: Value,
}Expand description
An SCXML event as seen by the datamodel in _event.
Fields§
§name: Stringname.
type_: EventTypetype.
sendid: Option<String>sendid.
origin: Option<String>origin.
origintype: Option<String>origintype.
originverified: booloriginverified: true only when the shell verified the sender’s authentication against
its resolved DID document before the event entered the session, so origin is that
sender’s DID. False for every other event, including runtime-assigned origins inside a
trusted cluster and anonymous senders. Absent in older journals and tapes, where it reads
as false.
invokeid: Option<String>invokeid.
data: Valuedata.
Implementations§
Source§impl Event
impl Event
Sourcepub fn named(name: impl Into<String>, type_: EventType) -> Self
pub fn named(name: impl Into<String>, type_: EventType) -> Self
An event with only a name and type.
Sourcepub fn with_verified_origin(self, sender: impl Into<String>) -> Self
pub fn with_verified_origin(self, sender: impl Into<String>) -> Self
This event with origin set to a sender DID the shell verified, and the verified flag
set ([[openspec:did-identity#Authenticated Event Origin]]).
Trait Implementations§
impl StructuralPartialEq for Event
Auto Trait Implementations§
impl Forget for Event
impl Freeze for Event
impl Move for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnsafeUnpin for Event
impl UnwindSafe for Event
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