Struct fluvio_smartmodule::dataplane::record::Record
source · pub struct Record<B = RecordData> {
pub preamble: RecordHeader,
pub key: Option<B>,
pub value: B,
pub headers: i64,
}Fields
preamble: RecordHeaderkey: Option<B>value: Bheaders: i64Implementations
sourceimpl<B> Record<B>where
B: Default,
impl<B> Record<B>where
B: Default,
sourcepub fn get_header(&self) -> &RecordHeader
pub fn get_header(&self) -> &RecordHeader
return reference to header
sourcepub fn get_mut_header(&mut self) -> &mut RecordHeader
pub fn get_mut_header(&mut self) -> &mut RecordHeader
return mutable reference to header
sourcepub fn add_base_offset(&mut self, relative_base_offset: i64)
pub fn add_base_offset(&mut self, relative_base_offset: i64)
add offset delta with new relative base offset
sourcepub fn into_value(self) -> B
pub fn into_value(self) -> B
Consumes this record, returning the inner value
sourceimpl Record<RecordData>
impl Record<RecordData>
pub fn new<V>(value: V) -> Record<RecordData>where
V: Into<RecordData>,
pub fn new_key_value<K, V>(key: K, value: V) -> Record<RecordData>where
K: Into<RecordKey>,
V: Into<RecordData>,
pub fn timestamp_delta(&self) -> i64
Trait Implementations
sourceimpl<K, V> From<(K, V)> for Record<RecordData>where
K: Into<RecordKey>,
V: Into<RecordData>,
impl<K, V> From<(K, V)> for Record<RecordData>where
K: Into<RecordKey>,
V: Into<RecordData>,
sourcefn from(_: (K, V)) -> Record<RecordData>
fn from(_: (K, V)) -> Record<RecordData>
Converts to this type from the input type.
Auto Trait Implementations
impl<B> RefUnwindSafe for Record<B>where
B: RefUnwindSafe,
impl<B> Send for Record<B>where
B: Send,
impl<B> Sync for Record<B>where
B: Sync,
impl<B> Unpin for Record<B>where
B: Unpin,
impl<B> UnwindSafe for Record<B>where
B: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more