Struct GroupSizeEncoding
pub struct GroupSizeEncoding {
pub block_length: u16,
pub num_in_group: u32,
}Expand description
Re-exported generic varString/group decoders shared across SBE adapters. Group header encoding (u16 block length + u32 count).
Fields§
§block_length: u16Encoded block length of each group entry.
num_in_group: u32Number of entries in the group.
Implementations§
§impl GroupSizeEncoding
impl GroupSizeEncoding
pub const ENCODED_LENGTH: usize = 6
pub const ENCODED_LENGTH: usize = 6
Encoded length in bytes.
pub fn decode(buf: &[u8]) -> Result<GroupSizeEncoding, SbeDecodeError>
pub fn decode(buf: &[u8]) -> Result<GroupSizeEncoding, SbeDecodeError>
Decodes a group header from buf.
§Errors
Returns BufferTooShort if fewer than 6 bytes are available and
GroupSizeTooLarge when num_in_group exceeds MAX_GROUP_SIZE.
Trait Implementations§
§impl Clone for GroupSizeEncoding
impl Clone for GroupSizeEncoding
§fn clone(&self) -> GroupSizeEncoding
fn clone(&self) -> GroupSizeEncoding
Returns a duplicate 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 more§impl Debug for GroupSizeEncoding
impl Debug for GroupSizeEncoding
§impl PartialEq for GroupSizeEncoding
impl PartialEq for GroupSizeEncoding
impl Copy for GroupSizeEncoding
impl Eq for GroupSizeEncoding
impl StructuralPartialEq for GroupSizeEncoding
Auto Trait Implementations§
impl Freeze for GroupSizeEncoding
impl RefUnwindSafe for GroupSizeEncoding
impl Send for GroupSizeEncoding
impl Sync for GroupSizeEncoding
impl Unpin for GroupSizeEncoding
impl UnsafeUnpin for GroupSizeEncoding
impl UnwindSafe for GroupSizeEncoding
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more