#[non_exhaustive]pub struct RequestHeader {
pub request_api_key: i16,
pub request_api_version: i16,
pub correlation_id: i32,
pub client_id: Option<String>,
pub unknown_tagged_fields: Vec<RawTaggedField>,
}Expand description
RequestHeader, versions 1-2.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.request_api_key: i16The API key of this request.
request_api_version: i16The API version of this request.
correlation_id: i32The correlation ID of this request.
client_id: Option<String>The client ID string.
unknown_tagged_fields: Vec<RawTaggedField>Tagged fields not (yet) known to this crate, kept raw.
Implementations§
Source§impl RequestHeader
impl RequestHeader
Sourcepub const MIN_VERSION: i16 = 1
pub const MIN_VERSION: i16 = 1
The lowest schema version this snapshot can speak.
Sourcepub const MAX_VERSION: i16 = 2
pub const MAX_VERSION: i16 = 2
The highest schema version this snapshot can speak.
Sourcepub fn encode(
&self,
buf: &mut impl BufMut,
version: i16,
) -> Result<(), EncodeError>
pub fn encode( &self, buf: &mut impl BufMut, version: i16, ) -> Result<(), EncodeError>
Encode this RequestHeader at version.
Sourcepub fn decode(buf: &mut impl Buf, version: i16) -> Result<Self, DecodeError>
pub fn decode(buf: &mut impl Buf, version: i16) -> Result<Self, DecodeError>
Decode one RequestHeader, bounding allocation by the default
Limits derived from buf’s remaining length.
Sourcepub fn decode_with_limits(
buf: &mut impl Buf,
version: i16,
limits: Limits,
) -> Result<Self, DecodeError>
pub fn decode_with_limits( buf: &mut impl Buf, version: i16, limits: Limits, ) -> Result<Self, DecodeError>
Decode one RequestHeader under limits.
Sourcepub fn decode_with_budget(
buf: &mut impl Buf,
version: i16,
budget: &mut Budget,
) -> Result<Self, DecodeError>
pub fn decode_with_budget( buf: &mut impl Buf, version: i16, budget: &mut Budget, ) -> Result<Self, DecodeError>
Decode one RequestHeader against an existing budget.
Trait Implementations§
Source§impl Clone for RequestHeader
impl Clone for RequestHeader
Source§impl Debug for RequestHeader
impl Debug for RequestHeader
Source§impl Default for RequestHeader
impl Default for RequestHeader
Source§impl PartialEq for RequestHeader
impl PartialEq for RequestHeader
impl StructuralPartialEq for RequestHeader
Auto Trait Implementations§
impl Forget for RequestHeader
impl Freeze for RequestHeader
impl Move for RequestHeader
impl RefUnwindSafe for RequestHeader
impl Send for RequestHeader
impl Sync for RequestHeader
impl Unpin for RequestHeader
impl UnsafeUnpin for RequestHeader
impl UnwindSafe for RequestHeader
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