pub struct ActivityItem {
pub action: ActivityAction,
pub model: String,
pub record: String,
pub record_id: String,
pub user: Option<String>,
pub timestamp: DateTime<Utc>,
pub url: Option<String>,
}Expand description
Activity item for dashboard
Fields§
§action: ActivityActionAction type
model: StringModel name
record: StringRecord identifier/name
record_id: StringRecord ID
user: Option<String>User who performed the action
timestamp: DateTime<Utc>Timestamp
url: Option<String>URL to the record
Implementations§
Source§impl ActivityItem
impl ActivityItem
Sourcepub fn new(
action: ActivityAction,
model: impl Into<String>,
record: impl Into<String>,
) -> Self
pub fn new( action: ActivityAction, model: impl Into<String>, record: impl Into<String>, ) -> Self
Create a new activity item
Sourcepub fn description(&self) -> String
pub fn description(&self) -> String
Get action description
Trait Implementations§
Source§impl Clone for ActivityItem
impl Clone for ActivityItem
Source§fn clone(&self) -> ActivityItem
fn clone(&self) -> ActivityItem
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 ActivityItem
impl Debug for ActivityItem
Source§impl<'de> Deserialize<'de> for ActivityItem
impl<'de> Deserialize<'de> for ActivityItem
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 ActivityItem
impl RefUnwindSafe for ActivityItem
impl Send for ActivityItem
impl Sync for ActivityItem
impl Unpin for ActivityItem
impl UnwindSafe for ActivityItem
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