pub struct Event {
pub id: String,
pub data: EventData,
pub timestamp: i64,
pub tracking_id: String,
pub alert_type: Option<AlertType>,
pub headers: HashMap<String, String>,
pub sequence_number: i64,
pub filter_message: bool,
}
Expand description
Returned from WebexEventStream::next()
. Contains information about the received event.
Fields§
§id: String
Event ID, may be UUID or base64-encoded. Please do not use this directly, prefer to use
Event::get_global_id()
.
data: EventData
§timestamp: i64
Timestamp in milliseconds since epoch.
tracking_id: String
§alert_type: Option<AlertType>
§headers: HashMap<String, String>
§sequence_number: i64
§filter_message: bool
Implementations§
source§impl Event
impl Event
sourcepub fn activity_type(&self) -> ActivityType
pub fn activity_type(&self) -> ActivityType
Get the type of resource the event corresponds to.
Also contains details about the event action for some event types.
For more details, check ActivityType
.
Panics
Will panic if conversation activity is not set
sourcepub fn get_global_id(&self) -> GlobalId
pub fn get_global_id(&self) -> GlobalId
A function to extract a global ID from an activity.
event.data.activity.id
is a UUID, which can no longer be used for API requests, meaning any attempt
at using this as an ID in a Webex::get_*
will fail.
Users should use this function to get a GlobalId
, which works with the updated API.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Event
impl<'de> Deserialize<'de> for Event
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
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