pub struct JournalEntry {
pub seq: u64,
pub timestamp: u64,
pub author: String,
pub address: String,
pub signal_type: SignalType,
pub value: Value,
pub revision: Option<u64>,
pub msg_type: u8,
}Expand description
A single journal entry representing a state change or event
Fields§
§seq: u64Monotonic sequence number (assigned by the journal)
timestamp: u64Wall clock timestamp (microseconds since epoch)
Author of this entry (entity or session ID)
address: StringCLASP address this entry applies to
signal_type: SignalTypeSignal type of the entry
value: ValueThe value that was set or published
revision: Option<u64>Param revision (for SET operations)
msg_type: u8Original message type code (0x20=PUBLISH, 0x21=SET, etc.)
Implementations§
Source§impl JournalEntry
impl JournalEntry
Sourcepub fn from_set(
address: String,
value: Value,
revision: u64,
author: String,
timestamp: u64,
) -> Self
pub fn from_set( address: String, value: Value, revision: u64, author: String, timestamp: u64, ) -> Self
Create a new journal entry for a SET operation
Sourcepub fn from_publish(
address: String,
signal_type: SignalType,
value: Value,
author: String,
timestamp: u64,
) -> Self
pub fn from_publish( address: String, signal_type: SignalType, value: Value, author: String, timestamp: u64, ) -> Self
Create a new journal entry for a PUBLISH operation
Trait Implementations§
Source§impl Clone for JournalEntry
impl Clone for JournalEntry
Source§fn clone(&self) -> JournalEntry
fn clone(&self) -> JournalEntry
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 JournalEntry
impl Debug for JournalEntry
Source§impl<'de> Deserialize<'de> for JournalEntry
impl<'de> Deserialize<'de> for JournalEntry
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 JournalEntry
impl RefUnwindSafe for JournalEntry
impl Send for JournalEntry
impl Sync for JournalEntry
impl Unpin for JournalEntry
impl UnsafeUnpin for JournalEntry
impl UnwindSafe for JournalEntry
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