pub struct EventRecord(/* private fields */);Expand description
Record for a row in an event log.
Implementations§
Source§impl EventRecord
impl EventRecord
Sourcepub fn new(
time: UtcDateTime,
last_commit: CommitHash,
commit: CommitHash,
event: Vec<u8>,
) -> Self
pub fn new( time: UtcDateTime, last_commit: CommitHash, commit: CommitHash, event: Vec<u8>, ) -> Self
Create an event record.
Sourcepub fn time(&self) -> &UtcDateTime
pub fn time(&self) -> &UtcDateTime
Date and time the record was created.
Sourcepub fn set_time(&mut self, time: UtcDateTime)
pub fn set_time(&mut self, time: UtcDateTime)
Set the record time.
Sourcepub fn last_commit(&self) -> &CommitHash
pub fn last_commit(&self) -> &CommitHash
Last commit hash for the record.
Sourcepub fn set_last_commit(&mut self, commit: Option<CommitHash>)
pub fn set_last_commit(&mut self, commit: Option<CommitHash>)
Set last commit hash for the record.
Sourcepub fn commit(&self) -> &CommitHash
pub fn commit(&self) -> &CommitHash
Commit hash for the record.
Sourcepub fn event_bytes(&self) -> &[u8] ⓘ
pub fn event_bytes(&self) -> &[u8] ⓘ
Record event bytes.
Trait Implementations§
Source§impl Clone for EventRecord
impl Clone for EventRecord
Source§fn clone(&self) -> EventRecord
fn clone(&self) -> EventRecord
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 EventRecord
impl Debug for EventRecord
Source§impl Decodable for EventRecord
impl Decodable for EventRecord
Source§impl Default for EventRecord
impl Default for EventRecord
Source§fn default() -> EventRecord
fn default() -> EventRecord
Returns the “default value” for a type. Read more
Source§impl Encodable for EventRecord
impl Encodable for EventRecord
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<EventRecord> for (UtcDateTime, CommitHash, CommitHash, Vec<u8>)
impl From<EventRecord> for (UtcDateTime, CommitHash, CommitHash, Vec<u8>)
Source§fn from(value: EventRecord) -> Self
fn from(value: EventRecord) -> Self
Converts to this type from the input type.
Source§impl PartialEq for EventRecord
impl PartialEq for EventRecord
impl Eq for EventRecord
impl StructuralPartialEq for EventRecord
Auto Trait Implementations§
impl Freeze for EventRecord
impl RefUnwindSafe for EventRecord
impl Send for EventRecord
impl Sync for EventRecord
impl Unpin for EventRecord
impl UnwindSafe for EventRecord
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