pub struct TruncationEvent { /* private fields */ }Expand description
GSM truncation marker event.
Emitted when Arena’s Player.log writes the
[Message summarized because one or more GameStateMessages exceeded the 50 GameObject or 50 Annotation limit.] marker in place of a normal
GameStateMessage JSON body. The truncated GSM’s body is irrecoverable
from the log; this event surfaces the signal so downstream consumers
(deck tracker) can mark the next gsm_id as crossing a data-loss gap.
Following the header-only convention used by LogFileRotatedEvent and
DetailedLoggingStatusEvent: timestamp lives in EventMetadata, the
payload carries {"object_count": N, "annotation_count": M}.
raw_bytes is empty because the marker has no parseable body and
downstream fingerprinting derives no value from preserving the
fixed-form marker text.
Implementations§
Source§impl TruncationEvent
impl TruncationEvent
Sourcepub fn new(metadata: EventMetadata, payload: Value) -> Self
pub fn new(metadata: EventMetadata, payload: Value) -> Self
Constructs a new event with the given metadata and payload.
Sourcepub fn metadata(&self) -> &EventMetadata
pub fn metadata(&self) -> &EventMetadata
Returns the shared event metadata.
Source§impl TruncationEvent
impl TruncationEvent
Sourcepub fn new_truncation(
timestamp: Option<DateTime<Utc>>,
object_count: u32,
annotation_count: u32,
) -> Self
pub fn new_truncation( timestamp: Option<DateTime<Utc>>, object_count: u32, annotation_count: u32, ) -> Self
Creates a truncation event from parsed marker counts.
Sourcepub fn object_count(&self) -> Option<u32>
pub fn object_count(&self) -> Option<u32>
Returns the truncated GSM’s reported game-object count, or None
if the payload was manually constructed without the field.
Sourcepub fn annotation_count(&self) -> Option<u32>
pub fn annotation_count(&self) -> Option<u32>
Returns the truncated GSM’s reported annotation count, or None
if the payload was manually constructed without the field.
Trait Implementations§
Source§impl Clone for TruncationEvent
impl Clone for TruncationEvent
Source§fn clone(&self) -> TruncationEvent
fn clone(&self) -> TruncationEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TruncationEvent
impl Debug for TruncationEvent
Source§impl<'de> Deserialize<'de> for TruncationEvent
impl<'de> Deserialize<'de> for TruncationEvent
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>,
Source§impl PartialEq for TruncationEvent
impl PartialEq for TruncationEvent
Source§fn eq(&self, other: &TruncationEvent) -> bool
fn eq(&self, other: &TruncationEvent) -> bool
self and other values to be equal, and is used by ==.