[][src]Struct zenoh_protocol::proto::Attachment

pub struct Attachment {
    pub encoding: u8,
    pub buffer: RBuf,
}

NOTE: 16 bits (2 bytes) may be prepended to the serialized message indicating the total lenght in bytes of the message, resulting in the maximum lenght of a message being 65_536 bytes. This is necessary in those stream-oriented transports (e.g., TCP) that do not preserve the boundary of the serialized messages. The length is encoded as little-endian. In any case, the lenght of a message must not exceed 65_535 bytes.

The Attachment can decorate any message (i.e., SessionMessage and ZenohMessage) and it allows to append to the message any additional information. Since the information contained in the Attachement is relevant only to the layer that provided them (e.g., Session, Zenoh, User) it is the duty of that layer to serialize and de-serialize the attachment whenever deemed necessary.

7 6 5 4 3 2 1 0 +-+-+-+-+-+-+-+-+ | ENC | ATTCH | +-+-+-+---------+ ~ Attachment ~ +---------------+

ENC values:

  • 0x00 => Zenoh Properties

Fields

encoding: u8buffer: RBuf

Implementations

impl Attachment[src]

pub fn make(encoding: u8, buffer: RBuf) -> Attachment[src]

Trait Implementations

impl Clone for Attachment[src]

impl Debug for Attachment[src]

impl PartialEq<Attachment> for Attachment[src]

impl StructuralPartialEq for Attachment[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,