Struct fluvio_smartmodule::Record
source · pub struct Record<B = RecordData> {
pub preamble: RecordHeader,
pub key: Option<B>,
pub value: B,
pub headers: i64,
}
Fields§
§preamble: RecordHeader
§key: Option<B>
§value: B
§headers: i64
Implementations§
source§impl<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
source§impl 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§
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§
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