#[non_exhaustive]pub struct Event {
pub action: Action,
pub author: String,
pub date: DateTime<Utc>,
pub mechanism: Mechanism,
pub metadata: Value,
pub object: String,
pub object_id: String,
pub author_anonymous: Option<bool>,
pub author_ip: Option<String>,
pub author_role: Option<String>,
pub author_user_agent: Option<String>,
pub session_id: Option<String>,
}Expand description
A Tracks event to publish.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.action: Action§date: DateTime<Utc>§mechanism: Mechanism§metadata: ValueArbitrary JSON object with additional event context.
Must be a JSON object (i.e. serde_json::json!({ "key": "value" })).
Passing a non-object value (array, string, number, …) will cause the
event to be silently dropped when EventResource::create is called.
object: String§object_id: String§session_id: Option<String>Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze 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