pub struct LogEntry {
pub project_id: String,
pub cbor_b64: String,
pub created: String,
pub id: LogEntryId,
}Expand description
Hub transport wrapper for one levi event. id = the event’s content address (git blob OID of its CBOR bytes); payload = base64(CBOR(MEvent)). Immutable and add-only, so “what are you missing” between a CLI and the hub is a set difference over LogEntry ids. A hub-side saga unwraps the inner event so dashboards query real entities.
Fields§
§project_id: String§cbor_b64: String§created: StringRFC3339 of the inner event (for activity-feed ordering).
id: LogEntryIdImplementations§
Source§impl LogEntry
impl LogEntry
Sourcepub fn wrap(
event_id: &str,
project_id: &str,
cbor_bytes: &[u8],
created: &str,
) -> Self
pub fn wrap( event_id: &str, project_id: &str, cbor_bytes: &[u8], created: &str, ) -> Self
Wrap an event for hub transport. event_id must be the event’s
content address (git blob OID of cbor_bytes).
Sourcepub fn cbor_bytes(&self) -> Result<Vec<u8>>
pub fn cbor_bytes(&self) -> Result<Vec<u8>>
Decode back to raw CBOR bytes.
Sourcepub fn unwrap_event(&self) -> Result<MEvent>
pub fn unwrap_event(&self) -> Result<MEvent>
Decode the inner wire event.
Trait Implementations§
Source§impl AnyItem for LogEntry
impl AnyItem for LogEntry
Source§fn entity_type(&self) -> &'static str
fn entity_type(&self) -> &'static str
Returns the entity type name (e.g., “Target”, “Scene”).
Source§fn server_owner(&self) -> Option<&str>
fn server_owner(&self) -> Option<&str>
Returns the current
#[server_owned] field value, if this item has one.Source§impl<'de> Deserialize<'de> for LogEntry
impl<'de> Deserialize<'de> for LogEntry
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 Eventable for LogEntry
impl Eventable for LogEntry
Source§const ENTITY_NAME_STATIC: &'static str = "LogEntry"
const ENTITY_NAME_STATIC: &'static str = "LogEntry"
Static entity type name (use
entity_type() from AnyItem for instance access).Source§fn entity_name_static() -> &'static str
fn entity_name_static() -> &'static str
Back-compat helper for generic call sites that still expect a function.
Source§fn ingest_buffer_policy() -> IngestBufferPolicy
fn ingest_buffer_policy() -> IngestBufferPolicy
Opt-in ingest buffering policy for this entity type.
Source§impl IdFor<LogEntry> for LogEntryId
impl IdFor<LogEntry> for LogEntryId
Source§impl Partial for LogEntry
impl Partial for LogEntry
Source§type Item = PartialLogEntry
type Item = PartialLogEntry
The type of the partial structure, that may have
Some values.Source§fn apply_some(&mut self, partial: Self::Item) -> bool
fn apply_some(&mut self, partial: Self::Item) -> bool
Applies
Some values from Partial::Item to self, returning true when
updates were made, and false when nothing was applied. Read moreimpl StructuralPartialEq for LogEntry
Auto Trait Implementations§
impl Freeze for LogEntry
impl RefUnwindSafe for LogEntry
impl Send for LogEntry
impl Sync for LogEntry
impl Unpin for LogEntry
impl UnsafeUnpin for LogEntry
impl UnwindSafe for LogEntry
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> CellValue for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more