pub struct RuntimeEvent {
pub id: Uuid,
pub runtime_id: Uuid,
pub event_type: RuntimeEventType,
pub timestamp: DateTime<Utc>,
pub message: String,
pub details: Option<Value>,
pub severity: EventSeverity,
}Expand description
运行时事件
Fields§
§id: Uuid事件ID
runtime_id: Uuid运行时ID
event_type: RuntimeEventType事件类型
timestamp: DateTime<Utc>事件时间
message: String事件描述
details: Option<Value>事件详情
severity: EventSeverity严重程度
Implementations§
Source§impl RuntimeEvent
impl RuntimeEvent
Sourcepub fn new(
runtime_id: Uuid,
event_type: RuntimeEventType,
message: String,
severity: EventSeverity,
) -> Self
pub fn new( runtime_id: Uuid, event_type: RuntimeEventType, message: String, severity: EventSeverity, ) -> Self
创建新事件
Sourcepub fn with_details(
runtime_id: Uuid,
event_type: RuntimeEventType,
message: String,
severity: EventSeverity,
details: Value,
) -> Self
pub fn with_details( runtime_id: Uuid, event_type: RuntimeEventType, message: String, severity: EventSeverity, details: Value, ) -> Self
带详情创建事件
Trait Implementations§
Source§impl Clone for RuntimeEvent
impl Clone for RuntimeEvent
Source§fn clone(&self) -> RuntimeEvent
fn clone(&self) -> RuntimeEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 RuntimeEvent
impl Debug for RuntimeEvent
Source§impl<'de> Deserialize<'de> for RuntimeEvent
impl<'de> Deserialize<'de> for RuntimeEvent
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 RuntimeEvent
impl RefUnwindSafe for RuntimeEvent
impl Send for RuntimeEvent
impl Sync for RuntimeEvent
impl Unpin for RuntimeEvent
impl UnsafeUnpin for RuntimeEvent
impl UnwindSafe for RuntimeEvent
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