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: i64Implementations§
Source§impl<B: Default> Record<B>
impl<B: Default> Record<B>
pub fn get_offset_delta(&self) -> Offset
Sourcepub fn add_base_offset(&mut self, relative_base_offset: Offset)
pub fn add_base_offset(&mut self, relative_base_offset: Offset)
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<V>(value: V) -> Selfwhere
V: Into<RecordData>,
pub fn new_key_value<K, V>(key: K, value: V) -> Self
Trait Implementations§
Auto Trait Implementations§
impl<B> Freeze for Record<B>where
B: Freeze,
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