[][src]Struct tox_packet::messenger::Msi

pub struct Msi { /* fields omitted */ }

Msi is a struct that holds info for Media Session Interface.

Sub-packet: kind [1 byte], size [1 byte], value [$size bytes] : but actually size is always 1, so a sub-packet is always 3 bytes long

  • kind: one of Request, Capabilities, Error
  • size: the length in byte of value(always 1)
  • value: enum value depending on kind

Payload: |sub_packet| |...{sub-packet}| |0|

Serialized form:

LengthContent
10x45
0..255payload

Sub-packet serialized form:

LengthContent
1kind(1 = Request, 2 = Error, 3 = Capabilities)
1size(always 1)
1value(it depends on kind)

Implementations

impl Msi[src]

pub fn new(
    request: RequestKind,
    error: Option<MsiErrorKind>,
    capabilities: CapabilitiesKind
) -> Self
[src]

Make new msi struct

Trait Implementations

impl Clone for Msi[src]

impl Debug for Msi[src]

impl Eq for Msi[src]

impl FromBytes for Msi[src]

impl PartialEq<Msi> for Msi[src]

impl StructuralEq for Msi[src]

impl StructuralPartialEq for Msi[src]

impl ToBytes for Msi[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> 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.