Skip to main content

Entry

Struct Entry 

Source
pub struct Entry {
    pub id: i64,
    pub user_id: Option<i64>,
    pub user_name: Option<String>,
    pub event: String,
    pub model_type: Option<String>,
    pub model_id: Option<String>,
    pub description: Option<String>,
    pub properties: Json,
    pub ip_address: Option<String>,
    pub user_agent: Option<String>,
    pub created_at: String,
}
Expand description

A row in the trail, as it goes in and as it comes back out.

Fields§

§id: i64§user_id: Option<i64>

Who did it. None for something the system did on its own, or for an action taken before signing in — a failed login has no user yet.

§user_name: Option<String>

Their name at the time, not as it is now.

§event: String§model_type: Option<String>§model_id: Option<String>§description: Option<String>§properties: Json§ip_address: Option<String>§user_agent: Option<String>§created_at: String

YYYY-MM-DD HH:MM:SS in UTC, the way the rest of the framework stores a time: it sorts as text, and all three databases keep it identically.

Implementations§

Source§

impl Entry

Source

pub fn new(event: impl Into<String>) -> Entry

Source

pub fn summary(&self) -> String

A one-line summary, falling back to something readable when the caller left the description off.

Trait Implementations§

Source§

impl Clone for Entry

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Entry

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Entry

Json has no Default, and giving one to properties here would be choosing between “no properties” and “an empty object” for every caller. Json::Null is the honest one: nothing was recorded.

Source§

fn default() -> Entry

Returns the “default value” for a type. Read more
Source§

impl PartialEq for Entry

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Entry

Auto Trait Implementations§

§

impl Freeze for Entry

§

impl RefUnwindSafe for Entry

§

impl Send for Entry

§

impl Sync for Entry

§

impl Unpin for Entry

§

impl UnsafeUnpin for Entry

§

impl UnwindSafe for Entry

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.