pub struct Event {
pub id: i64,
pub issue_id: String,
pub event_type: EventType,
pub actor: String,
pub old_value: Option<String>,
pub new_value: Option<String>,
pub comment: Option<String>,
pub created_at: DateTime<Utc>,
}Expand description
An audit event recording a change to an issue.
Fields§
§id: i64Unique event ID.
issue_id: StringAssociated issue ID.
event_type: EventTypeType of change.
actor: StringWho made the change.
old_value: Option<String>Previous value (if applicable).
new_value: Option<String>New value (if applicable).
comment: Option<String>Explanatory note.
created_at: DateTime<Utc>When the event occurred.
Implementations§
Source§impl Event
impl Event
Sourcepub fn new(
id: i64,
issue_id: impl Into<String>,
event_type: EventType,
actor: impl Into<String>,
) -> Self
pub fn new( id: i64, issue_id: impl Into<String>, event_type: EventType, actor: impl Into<String>, ) -> Self
Create a new event.
Sourcepub fn with_change(
self,
old_value: Option<String>,
new_value: Option<String>,
) -> Self
pub fn with_change( self, old_value: Option<String>, new_value: Option<String>, ) -> Self
Set old and new values.
Sourcepub fn with_comment(self, comment: impl Into<String>) -> Self
pub fn with_comment(self, comment: impl Into<String>) -> Self
Set a comment.
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 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