pub struct Event {
pub id: Option<i64>,
pub timestamp: DateTime<Utc>,
pub duration: TimeDelta,
pub data: Map<String, Value>,
}
Fields§
§id: Option<i64>
An unique id for this event. Will be assigned once the event has reached the servers datastore.
WARNING: If you set the ID and insert the event to the server it will replace the previous event with that ID. Only do this if you are completely sure what you are doing.
timestamp: DateTime<Utc>
An rfc3339 timestamp which represents the start of the event
duration: TimeDelta
Duration of the event as a floating point number in seconds. Appended to the timestamp it can represent the end of the event Maximum precision is nanoseconds.
data: Map<String, Value>
Can contain any arbitrary JSON data that represents the value of the event. All events in a bucket should follow the format of it’s respective bucket-type.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Event
impl<'de> Deserialize<'de> for Event
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Event, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Event, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for Event
impl JsonSchema for Event
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moreSource§impl Serialize for Event
impl Serialize for Event
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 Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin 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