pub struct Record {
pub record_type: RecordType,
pub type_byte: u8,
pub payload: Bytes,
pub offset: usize,
}Expand description
A parsed TLV record
Fields§
§record_type: RecordTypeRecord type
type_byte: u8Raw type byte (for user-defined types)
payload: BytesRecord payload (zero-copy reference to original data)
offset: usizeOffset in the original data where this record started
Implementations§
Source§impl Record
impl Record
Sourcepub fn new(
record_type: RecordType,
type_byte: u8,
payload: Bytes,
offset: usize,
) -> Self
pub fn new( record_type: RecordType, type_byte: u8, payload: Bytes, offset: usize, ) -> Self
Create a new record
Sourcepub fn is_tombstone(&self) -> bool
pub fn is_tombstone(&self) -> bool
Check if this is a tombstone record
Sourcepub fn total_size(&self) -> usize
pub fn total_size(&self) -> usize
Get the total size of this record (header + payload)
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Record
impl RefUnwindSafe for Record
impl Send for Record
impl Sync for Record
impl Unpin for Record
impl UnwindSafe for Record
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request