pub struct ProspectiveEvent {
pub id: String,
pub stream: String,
pub event_type: String,
pub subject: Option<String>,
pub data: Option<EventData>,
pub time: Option<DateTime<Utc>>,
pub datacontenttype: Option<String>,
pub dataschema: Option<String>,
pub extensions: Vec<(String, ExtensionValue)>,
}Expand description
A prospective event before storage.
In EvidentSource, prospective events use the stream name directly as the source.
When stored, the server transforms this into a full URI in the Event type.
Fields§
§id: StringUnique identifier for this event (typically UUID).
stream: StringThe stream this event belongs to. Maps to CloudEvents source.
event_type: StringThe event type (e.g., “com.example.account.opened”).
subject: Option<String>Optional subject identifying the entity this event is about.
data: Option<EventData>Optional event data payload.
time: Option<DateTime<Utc>>Optional timestamp when the event occurred.
datacontenttype: Option<String>Optional content type of the data (e.g., “application/json”).
dataschema: Option<String>Optional schema URI for the data.
extensions: Vec<(String, ExtensionValue)>Extension attributes.
Implementations§
Source§impl ProspectiveEvent
impl ProspectiveEvent
Sourcepub fn event_type(&self) -> &str
pub fn event_type(&self) -> &str
Get the event type.
Sourcepub fn extension(&self, key: &str) -> Option<&ExtensionValue>
pub fn extension(&self, key: &str) -> Option<&ExtensionValue>
Get an extension value by key.
Trait Implementations§
Source§impl Clone for ProspectiveEvent
impl Clone for ProspectiveEvent
Source§fn clone(&self) -> ProspectiveEvent
fn clone(&self) -> ProspectiveEvent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProspectiveEvent
impl Debug for ProspectiveEvent
Source§impl From<ProspectiveEvent> for CloudEvent
impl From<ProspectiveEvent> for CloudEvent
Source§fn from(event: ProspectiveEvent) -> Self
fn from(event: ProspectiveEvent) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ProspectiveEvent
impl RefUnwindSafe for ProspectiveEvent
impl Send for ProspectiveEvent
impl Sync for ProspectiveEvent
impl Unpin for ProspectiveEvent
impl UnwindSafe for ProspectiveEvent
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request