Struct fluvio_dataplane_protocol::record::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
sourceimpl<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
sourceimpl Record
impl Record
pub fn new<V>(value: V) -> Self where
V: Into<RecordData>,
pub fn new_key_value<K, V>(key: K, value: V) -> Self where
K: Into<RecordKey>,
V: Into<RecordData>,
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more