pub struct RawPayload<'buf> {
pub bytes: &'buf [u8],
pub key: Option<&'buf [u8]>,
pub partition: PartitionId,
pub offset: i64,
pub timestamp_ms: i64,
}Expand description
A raw payload borrowed from the source’s buffers, valid for 'buf.
Fields§
§bytes: &'buf [u8]The message value.
key: Option<&'buf [u8]>The message key, when the source provides one.
partition: PartitionIdSource partition.
offset: i64Source offset.
timestamp_ms: i64Source-reported event time (ms since epoch).
Implementations§
Source§impl RawPayload<'_>
impl RawPayload<'_>
Sourcepub fn meta(&self) -> RecordMeta
pub fn meta(&self) -> RecordMeta
Metadata for records derived from this payload. The key hash uses a stable 64-bit hash so shard routing survives restarts and versions.
Trait Implementations§
Source§impl<'buf> Clone for RawPayload<'buf>
impl<'buf> Clone for RawPayload<'buf>
Source§fn clone(&self) -> RawPayload<'buf>
fn clone(&self) -> RawPayload<'buf>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'buf> Debug for RawPayload<'buf>
impl<'buf> Debug for RawPayload<'buf>
impl<'buf> Copy for RawPayload<'buf>
Auto Trait Implementations§
impl<'buf> Freeze for RawPayload<'buf>
impl<'buf> RefUnwindSafe for RawPayload<'buf>
impl<'buf> Send for RawPayload<'buf>
impl<'buf> Sync for RawPayload<'buf>
impl<'buf> Unpin for RawPayload<'buf>
impl<'buf> UnsafeUnpin for RawPayload<'buf>
impl<'buf> UnwindSafe for RawPayload<'buf>
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
Casts
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read moreSource§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