pub struct Encoding {
pub id: EncodingId,
pub schema: Option<ZSlice>,
}
Expand description
Encoding
is a metadata that indicates how the data payload should be interpreted.
For wire-efficiency and extensibility purposes, Zenoh defines an Encoding
as
composed of an unsigned integer prefix and a bytes schema. The actual meaning of the
prefix and schema are out-of-scope of the protocol definition. Therefore, Zenoh does not
impose any encoding mapping and users are free to use any mapping they like.
Nevertheless, it is worth highlighting that Zenoh still provides a default mapping as part
of the API as per user convenience. That mapping has no impact on the Zenoh protocol definition.
Fields§
§id: EncodingId
§schema: Option<ZSlice>
Implementations§
Trait Implementations§
impl Eq for Encoding
impl StructuralPartialEq for Encoding
Auto Trait Implementations§
impl Freeze for Encoding
impl !RefUnwindSafe for Encoding
impl Send for Encoding
impl Sync for Encoding
impl Unpin for Encoding
impl !UnwindSafe for Encoding
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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