pub struct SingleMessageMetadata {
pub properties: Vec<KeyValue>,
pub partition_key: Option<String>,
pub payload_size: i32,
pub compacted_out: Option<bool>,
pub event_time: Option<u64>,
pub partition_key_b64_encoded: Option<bool>,
pub ordering_key: Option<Vec<u8>>,
pub sequence_id: Option<u64>,
pub null_value: Option<bool>,
pub null_partition_key: Option<bool>,
}Fields§
§properties: Vec<KeyValue>§partition_key: Option<String>§payload_size: i32§compacted_out: Option<bool>§event_time: Option<u64>the timestamp that this event occurs. it is typically set by applications.
if this field is omitted, publish_time can be used for the purpose of event_time.
partition_key_b64_encoded: Option<bool>§ordering_key: Option<Vec<u8>>Specific a key to overwrite the message key which used for ordering dispatch in Key_Shared mode.
sequence_id: Option<u64>Allows consumer retrieve the sequence id that the producer set.
null_value: Option<bool>Indicate if the message payload value is set
null_partition_key: Option<bool>Indicate if the message partition key is set
Implementations§
Source§impl SingleMessageMetadata
impl SingleMessageMetadata
Sourcepub fn partition_key(&self) -> &str
pub fn partition_key(&self) -> &str
Returns the value of partition_key, or the default value if partition_key is unset.
Sourcepub fn compacted_out(&self) -> bool
pub fn compacted_out(&self) -> bool
Returns the value of compacted_out, or the default value if compacted_out is unset.
Sourcepub fn event_time(&self) -> u64
pub fn event_time(&self) -> u64
Returns the value of event_time, or the default value if event_time is unset.
Sourcepub fn partition_key_b64_encoded(&self) -> bool
pub fn partition_key_b64_encoded(&self) -> bool
Returns the value of partition_key_b64_encoded, or the default value if partition_key_b64_encoded is unset.
Sourcepub fn ordering_key(&self) -> &[u8] ⓘ
pub fn ordering_key(&self) -> &[u8] ⓘ
Returns the value of ordering_key, or the default value if ordering_key is unset.
Sourcepub fn sequence_id(&self) -> u64
pub fn sequence_id(&self) -> u64
Returns the value of sequence_id, or the default value if sequence_id is unset.
Sourcepub fn null_value(&self) -> bool
pub fn null_value(&self) -> bool
Returns the value of null_value, or the default value if null_value is unset.
Sourcepub fn null_partition_key(&self) -> bool
pub fn null_partition_key(&self) -> bool
Returns the value of null_partition_key, or the default value if null_partition_key is unset.
Trait Implementations§
Source§impl Clone for SingleMessageMetadata
impl Clone for SingleMessageMetadata
Source§fn clone(&self) -> SingleMessageMetadata
fn clone(&self) -> SingleMessageMetadata
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SingleMessageMetadata
impl Debug for SingleMessageMetadata
Source§impl Default for SingleMessageMetadata
impl Default for SingleMessageMetadata
Source§impl Message for SingleMessageMetadata
impl Message for SingleMessageMetadata
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
self. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
self.Source§impl PartialEq for SingleMessageMetadata
impl PartialEq for SingleMessageMetadata
impl StructuralPartialEq for SingleMessageMetadata
Auto Trait Implementations§
impl Freeze for SingleMessageMetadata
impl RefUnwindSafe for SingleMessageMetadata
impl Send for SingleMessageMetadata
impl Sync for SingleMessageMetadata
impl Unpin for SingleMessageMetadata
impl UnsafeUnpin for SingleMessageMetadata
impl UnwindSafe for SingleMessageMetadata
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more