Skip to main content

PublishStateNotify

Struct PublishStateNotify 

Source
pub struct PublishStateNotify {
    pub parameters: Vec<KeyValuePair>,
}
Expand description

PUBLISH_STATE_NOTIFY (0x22), new in draft-20 (Section 10.10, Figure 13).

PUBLISH_STATE_NOTIFY Message {
  Type (vi64) = 0x22,
  Length (16),
  Number of Parameters (vi64),
  Parameters (..) ...
}

There is no Request ID field. The message is identified by the subscription’s bidirectional request stream it arrives on, the way SUBSCRIBE_OK, PUBLISH_DONE and FETCH_OK are.

The rules a codec cannot check, because they are about the session rather than the frame, and which the caller therefore owns (Section 10.10):

  • it is sent by the publisher only, on a subscription’s stream. Receiving one for any other request type, or from the subscriber, MUST close the session with a PROTOCOL_VIOLATION;
  • it is unilateral — the receiver does not answer with REQUEST_OK or REQUEST_ERROR — and it is not counted against the MAX_REQUEST_UPDATES Setup Option;
  • it carries only the parameters whose values changed, and an absent parameter is unchanged;
  • a publisher MUST NOT use it to change a subscriber-controlled parameter unless the subscriber asked for the change;
  • the publisher MUST include LARGEST_OBJECT (0x09) if known, so the subscriber can locate the point in the track where the change took effect. Nothing here enforces that: a missing required parameter is not something this decoder detects, and a message that omits it is still a well-formed frame.

Fields§

§parameters: Vec<KeyValuePair>

Trait Implementations§

Source§

impl Clone for PublishStateNotify

Source§

fn clone(&self) -> PublishStateNotify

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PublishStateNotify

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for PublishStateNotify

Source§

impl PartialEq for PublishStateNotify

Source§

fn eq(&self, other: &PublishStateNotify) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for PublishStateNotify

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.