pub struct Attributes(pub i16);Expand description
Packed batch-level attributes, encoded as a 16-bit big-endian field in the wire header.
- bits 0-2: compression type (matches
CompressionType::as_attribute_bits) - bit 3: timestamp type (0 =
CreateTime, 1 =LogAppendTime) - bit 4:
is_transactional - bit 5:
is_control_batch - bit 6:
has_delete_horizon_ms(Kafka 2.8+; not surfaced separately here) - bits 7-15: reserved
Tuple Fields§
§0: i16Implementations§
Source§impl Attributes
impl Attributes
pub const TIMESTAMP_TYPE_BIT: i16
pub const TRANSACTIONAL_BIT: i16
pub const CONTROL_BIT: i16
pub fn compression(self) -> CompressionType
pub fn timestamp_type(self) -> TimestampType
pub fn is_transactional(self) -> bool
pub fn is_control_batch(self) -> bool
pub fn with_compression(self, c: CompressionType) -> Self
pub fn with_timestamp_type(self, t: TimestampType) -> Self
pub fn with_transactional(self, b: bool) -> Self
pub fn with_control(self, b: bool) -> Self
Trait Implementations§
Source§impl Clone for Attributes
impl Clone for Attributes
Source§fn clone(&self) -> Attributes
fn clone(&self) -> Attributes
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for Attributes
Source§impl Debug for Attributes
impl Debug for Attributes
Source§impl Default for Attributes
impl Default for Attributes
Source§fn default() -> Attributes
fn default() -> Attributes
Returns the “default value” for a type. Read more
impl Eq for Attributes
Source§impl PartialEq for Attributes
impl PartialEq for Attributes
Source§fn eq(&self, other: &Attributes) -> bool
fn eq(&self, other: &Attributes) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for Attributes
Auto Trait Implementations§
impl Freeze for Attributes
impl RefUnwindSafe for Attributes
impl Send for Attributes
impl Sync for Attributes
impl Unpin for Attributes
impl UnsafeUnpin for Attributes
impl UnwindSafe for Attributes
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