pub struct KafkaString { /* private fields */ }Expand description
A Kafka protocol string backed by Bytes for zero-copy access.
UTF-8 is validated on construction so Self::as_str is infallible
without unsafe (re-validation is cheap and unsafe is forbidden by
the workspace lint set).
Implementations§
Source§impl KafkaString
impl KafkaString
Sourcepub const fn from_static(s: &'static str) -> Self
pub const fn from_static(s: &'static str) -> Self
Construct from a 'static string literal. Infallible.
Trait Implementations§
Source§impl Clone for KafkaString
impl Clone for KafkaString
Source§fn clone(&self) -> KafkaString
fn clone(&self) -> KafkaString
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 moreSource§impl Debug for KafkaString
impl Debug for KafkaString
Source§impl Default for KafkaString
impl Default for KafkaString
Source§impl Display for KafkaString
impl Display for KafkaString
impl Eq for KafkaString
Source§impl From<String> for KafkaString
impl From<String> for KafkaString
Source§impl Hash for KafkaString
impl Hash for KafkaString
Source§impl PartialEq for KafkaString
impl PartialEq for KafkaString
Source§fn eq(&self, other: &KafkaString) -> bool
fn eq(&self, other: &KafkaString) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for KafkaString
Auto Trait Implementations§
impl !Freeze for KafkaString
impl RefUnwindSafe for KafkaString
impl Send for KafkaString
impl Sync for KafkaString
impl Unpin for KafkaString
impl UnsafeUnpin for KafkaString
impl UnwindSafe for KafkaString
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