pub struct LoraBinary { /* private fields */ }Expand description
A logical binary/blob value stored as one or more byte segments.
Small values usually have a single segment. Larger values can preserve producer-side chunking so codecs can write/read length-prefixed segments without building one large temporary buffer.
Implementations§
Source§impl LoraBinary
impl LoraBinary
pub fn from_bytes(bytes: Vec<u8>) -> Self
pub fn from_segments(segments: Vec<Vec<u8>>) -> Self
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn segments(&self) -> &[Vec<u8>]
pub fn chunks(&self) -> impl Iterator<Item = &[u8]> + '_
pub fn into_segments(self) -> Vec<Vec<u8>>
pub fn to_vec(&self) -> Vec<u8> ⓘ
Trait Implementations§
Source§impl Clone for LoraBinary
impl Clone for LoraBinary
Source§fn clone(&self) -> LoraBinary
fn clone(&self) -> LoraBinary
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 moreSource§impl Debug for LoraBinary
impl Debug for LoraBinary
Source§impl<'de> Deserialize<'de> for LoraBinary
impl<'de> Deserialize<'de> for LoraBinary
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 Hash for LoraBinary
impl Hash for LoraBinary
Source§impl PartialEq for LoraBinary
impl PartialEq for LoraBinary
Source§impl Serialize for LoraBinary
impl Serialize for LoraBinary
impl Eq for LoraBinary
Auto Trait Implementations§
impl Freeze for LoraBinary
impl RefUnwindSafe for LoraBinary
impl Send for LoraBinary
impl Sync for LoraBinary
impl Unpin for LoraBinary
impl UnsafeUnpin for LoraBinary
impl UnwindSafe for LoraBinary
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