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
impl Record
pub fn new(value: impl Into<RecordData>) -> Record
pub fn new_key_value( key: impl Into<RecordKey>, value: impl Into<RecordData> ) -> Record
pub fn timestamp_delta(&self) -> i64
pub fn offset_delta(&self) -> i64
Trait Implementations§
source§impl From<SmartModuleRecord> for Record
impl From<SmartModuleRecord> for Record
source§fn from(sm_record: SmartModuleRecord) -> Record
fn from(sm_record: SmartModuleRecord) -> Record
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§
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