pub struct KafkaRecord {
pub topic: String,
pub timestamp: Option<i64>,
pub partition: i32,
pub offset: i64,
pub headers: BTreeMap<String, String>,
pub key_schema: Option<Schema>,
pub value_schema: Option<Schema>,
pub size: usize,
pub key: DataType,
pub key_as_string: String,
pub value: DataType,
pub value_as_string: String,
}
Expand description
Inspired of the [rdkafka::Message]
struct.
Currently, we only support utf-8 string keys/values/headers.
Fields§
§topic: String
§timestamp: Option<i64>
§partition: i32
§offset: i64
§headers: BTreeMap<String, String>
§key_schema: Option<Schema>
§value_schema: Option<Schema>
§size: usize
Number of bytes in the key + the value
key: DataType
A human readable representation of the key
key_as_string: String
§value: DataType
A human readable representation of the value
value_as_string: String
The value as a string. needed to be displayed in the TUI
Trait Implementations§
Source§impl Clone for KafkaRecord
impl Clone for KafkaRecord
Source§fn clone(&self) -> KafkaRecord
fn clone(&self) -> KafkaRecord
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for KafkaRecord
impl Debug for KafkaRecord
Source§impl Default for KafkaRecord
impl Default for KafkaRecord
Source§fn default() -> KafkaRecord
fn default() -> KafkaRecord
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for KafkaRecord
impl<'de> Deserialize<'de> for KafkaRecord
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for KafkaRecord
impl Hash for KafkaRecord
Source§impl PartialEq for KafkaRecord
impl PartialEq for KafkaRecord
Source§impl Serialize for KafkaRecord
impl Serialize for KafkaRecord
impl Eq for KafkaRecord
impl StructuralPartialEq for KafkaRecord
Auto Trait Implementations§
impl Freeze for KafkaRecord
impl RefUnwindSafe for KafkaRecord
impl Send for KafkaRecord
impl Sync for KafkaRecord
impl Unpin for KafkaRecord
impl UnwindSafe for KafkaRecord
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.