pub struct CdcEvent {
pub stream_id: String,
pub op: CdcOp,
pub key: String,
pub hash: Option<String>,
pub data: Option<Vec<u8>>,
pub meta: Option<CdcMeta>,
}Expand description
A parsed CDC event from the stream.
Fields§
§stream_id: StringStream entry ID (e.g., “1234567890123-0”)
op: CdcOpOperation type
key: StringObject ID (key)
hash: Option<String>Content hash for deduplication (only for PUT)
data: Option<Vec<u8>>Decompressed data payload (only for PUT)
meta: Option<CdcMeta>Parsed metadata (only for PUT)
Implementations§
Source§impl CdcEvent
impl CdcEvent
Sourcepub fn trace_parent(&self) -> Option<&str>
pub fn trace_parent(&self) -> Option<&str>
Get the trace parent from metadata, if present.
Format: W3C Trace Context (e.g., “00-traceid-spanid-flags”)
Sourcepub fn trace_id(&self) -> Option<&str>
pub fn trace_id(&self) -> Option<&str>
Extract trace ID from trace_parent (first 32 hex chars after version).
Sourcepub fn parent_span_id(&self) -> Option<&str>
pub fn parent_span_id(&self) -> Option<&str>
Extract span ID from trace_parent (16 hex chars after trace ID).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CdcEvent
impl RefUnwindSafe for CdcEvent
impl Send for CdcEvent
impl Sync for CdcEvent
impl Unpin for CdcEvent
impl UnwindSafe for CdcEvent
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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