pub struct AnalyticsEvent {
pub id: String,
pub event_type: RbacEventType,
pub timestamp: DateTime<Utc>,
pub user_id: Option<String>,
pub role_id: Option<String>,
pub resource: Option<String>,
pub action: Option<String>,
pub result: EventResult,
pub metadata: HashMap<String, String>,
pub duration_ms: Option<u64>,
pub source_ip: Option<String>,
pub user_agent: Option<String>,
}Expand description
Analytics event data
Fields§
§id: StringUnique event ID
event_type: RbacEventTypeEvent type
timestamp: DateTime<Utc>Timestamp
user_id: Option<String>User ID (if applicable)
role_id: Option<String>Role ID (if applicable)
resource: Option<String>Permission/resource (if applicable)
action: Option<String>Action performed
result: EventResultResult of the operation
metadata: HashMap<String, String>Additional metadata
duration_ms: Option<u64>Processing duration (milliseconds)
source_ip: Option<String>Source IP address
user_agent: Option<String>User agent
Trait Implementations§
Source§impl Clone for AnalyticsEvent
impl Clone for AnalyticsEvent
Source§fn clone(&self) -> AnalyticsEvent
fn clone(&self) -> AnalyticsEvent
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 AnalyticsEvent
impl Debug for AnalyticsEvent
Source§impl<'de> Deserialize<'de> for AnalyticsEvent
impl<'de> Deserialize<'de> for AnalyticsEvent
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 Freeze for AnalyticsEvent
impl RefUnwindSafe for AnalyticsEvent
impl Send for AnalyticsEvent
impl Sync for AnalyticsEvent
impl Unpin for AnalyticsEvent
impl UnwindSafe for AnalyticsEvent
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more