Struct Event
pub struct Event<T> {
pub metadata: EventMetadata,
pub params: T,
}
Expand description
A Falco event.
This struct represents a Falco event with metadata and parameters. The EventMetadata
contains
fields common to all events (the timestamp and thread ID), while the params
field contains
the event-specific data.
Fields§
§metadata: EventMetadata
The metadata for the event, which includes common fields like timestamp and thread ID.
params: T
The parameters for the event, which are specific to the type of event.
Trait Implementations§
§impl<T> AnyEventPayload for Event<T>where
T: AnyEventPayload,
impl<T> AnyEventPayload for Event<T>where
T: AnyEventPayload,
§const SOURCES: &'static [Option<&'static str>] = T::SOURCES
const SOURCES: &'static [Option<&'static str>] = T::SOURCES
The sources of the events that this payload type can represent.
§const EVENT_TYPES: &'static [u16] = T::EVENT_TYPES
const EVENT_TYPES: &'static [u16] = T::EVENT_TYPES
The event types that this payload type can represent.
§fn event_sources() -> Vec<&'static str>
fn event_sources() -> Vec<&'static str>
Get all the event sources for this payload type Read more
§impl<T> EventToBytes for Event<T>where
T: PayloadToBytes,
impl<T> EventToBytes for Event<T>where
T: PayloadToBytes,
Auto Trait Implementations§
impl<T> Freeze for Event<T>where
T: Freeze,
impl<T> RefUnwindSafe for Event<T>where
T: RefUnwindSafe,
impl<T> Send for Event<T>where
T: Send,
impl<T> Sync for Event<T>where
T: Sync,
impl<T> Unpin for Event<T>where
T: Unpin,
impl<T> UnwindSafe for Event<T>where
T: UnwindSafe,
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