pub struct ApiVersion(pub i16);Expand description
A Kafka request and response API version. Wire type: int16.
It pairs with an ApiKey in a request header. The two adjacent i16s are
the textbook swap shape, and these distinct types prevent that swap.
Tuple Fields§
§0: i16Implementations§
Trait Implementations§
Source§impl Clone for ApiVersion
impl Clone for ApiVersion
Source§fn clone(&self) -> ApiVersion
fn clone(&self) -> ApiVersion
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 ApiVersion
Source§impl Debug for ApiVersion
impl Debug for ApiVersion
Source§impl Default for ApiVersion
impl Default for ApiVersion
Source§fn default() -> ApiVersion
fn default() -> ApiVersion
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ApiVersion
impl<'de> Deserialize<'de> for ApiVersion
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 Display for ApiVersion
impl Display for ApiVersion
impl Eq for ApiVersion
Source§impl From<ApiVersion> for i16
impl From<ApiVersion> for i16
Source§fn from(value: ApiVersion) -> Self
fn from(value: ApiVersion) -> Self
Converts to this type from the input type.
Source§impl From<i16> for ApiVersion
impl From<i16> for ApiVersion
Source§impl Hash for ApiVersion
impl Hash for ApiVersion
Source§impl Ord for ApiVersion
impl Ord for ApiVersion
Source§fn cmp(&self, other: &ApiVersion) -> Ordering
fn cmp(&self, other: &ApiVersion) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ApiVersion
impl PartialEq for ApiVersion
Source§fn eq(&self, other: &ApiVersion) -> bool
fn eq(&self, other: &ApiVersion) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialEq<ApiVersion> for i16
impl PartialEq<ApiVersion> for i16
Source§fn eq(&self, other: &ApiVersion) -> bool
fn eq(&self, other: &ApiVersion) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialEq<i16> for ApiVersion
impl PartialEq<i16> for ApiVersion
Source§impl PartialOrd for ApiVersion
impl PartialOrd for ApiVersion
Source§impl PartialOrd<ApiVersion> for i16
impl PartialOrd<ApiVersion> for i16
Source§impl PartialOrd<i16> for ApiVersion
impl PartialOrd<i16> for ApiVersion
Source§impl Serialize for ApiVersion
impl Serialize for ApiVersion
impl StructuralPartialEq for ApiVersion
Auto Trait Implementations§
impl Freeze for ApiVersion
impl RefUnwindSafe for ApiVersion
impl Send for ApiVersion
impl Sync for ApiVersion
impl Unpin for ApiVersion
impl UnsafeUnpin for ApiVersion
impl UnwindSafe for ApiVersion
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