pub struct AuditEvent { /* private fields */ }Expand description
Audit log record.
An audit log record with no associated data is 36 bytes.
When associated data is available an additional 16 bytes is used for events on a vault and 32 bytes for events on a secret and for a move event 64 bytes is used.
The maximum size of a log record is thus 100 bytes.
- 2 bytes for bit flags.
- 8 bytes for the timestamp seconds.
- 4 bytes for the timestamp nanoseconds.
- 2 bytes for the event kind identifier.
- 20 bytes for the public account_id.
- 16, 32 or 64 bytes for the context data (one, two or four UUIDs).
Implementations§
Source§impl AuditEvent
impl AuditEvent
Sourcepub fn new(
date_time: UtcDateTime,
event_kind: EventKind,
account_id: AccountId,
data: Option<AuditData>,
) -> Self
pub fn new( date_time: UtcDateTime, event_kind: EventKind, account_id: AccountId, data: Option<AuditData>, ) -> Self
Create a new audit log event.
Sourcepub fn account_id(&self) -> &AccountId
pub fn account_id(&self) -> &AccountId
Account identifier for this audit event.
Sourcepub fn time(&self) -> &UtcDateTime
pub fn time(&self) -> &UtcDateTime
Date and time for this audit event.
Sourcepub fn event_kind(&self) -> EventKind
pub fn event_kind(&self) -> EventKind
Event kind for this audit event.
Trait Implementations§
Source§impl Clone for AuditEvent
impl Clone for AuditEvent
Source§fn clone(&self) -> AuditEvent
fn clone(&self) -> AuditEvent
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 AuditEvent
impl Debug for AuditEvent
Source§impl Decodable for AuditEvent
impl Decodable for AuditEvent
Source§impl Default for AuditEvent
impl Default for AuditEvent
Source§fn default() -> AuditEvent
fn default() -> AuditEvent
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for AuditEvent
impl<'de> Deserialize<'de> for AuditEvent
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
Source§impl Encodable for AuditEvent
impl Encodable for AuditEvent
Source§fn encode<'life0, 'life1, 'async_trait, W>(
&'life0 self,
writer: &'life1 mut BinaryWriter<W>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
W: 'async_trait + AsyncWrite + AsyncSeek + Unpin + Send,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn encode<'life0, 'life1, 'async_trait, W>(
&'life0 self,
writer: &'life1 mut BinaryWriter<W>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
W: 'async_trait + AsyncWrite + AsyncSeek + Unpin + Send,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Encode self into the binary writer.
Source§impl From<(&AccountId, &AccountEvent)> for AuditEvent
impl From<(&AccountId, &AccountEvent)> for AuditEvent
Source§fn from(value: (&AccountId, &AccountEvent)) -> Self
fn from(value: (&AccountId, &AccountEvent)) -> Self
Converts to this type from the input type.
Source§impl PartialEq for AuditEvent
impl PartialEq for AuditEvent
Source§impl Serialize for AuditEvent
impl Serialize for AuditEvent
impl Eq for AuditEvent
impl StructuralPartialEq for AuditEvent
Auto Trait Implementations§
impl Freeze for AuditEvent
impl RefUnwindSafe for AuditEvent
impl Send for AuditEvent
impl Sync for AuditEvent
impl Unpin for AuditEvent
impl UnwindSafe for AuditEvent
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