Opcode

Enum Opcode 

Source
pub enum Opcode {
Show 20 variants None = 0, Play = 1, Pause = 2, Resume = 3, Stop = 4, Seek = 5, PlaybackUpdate = 6, VolumeUpdate = 7, SetVolume = 8, PlaybackError = 9, SetSpeed = 10, Version = 11, Ping = 12, Pong = 13, Initial = 14, PlayUpdate = 15, SetPlaylistItem = 16, SubscribeEvent = 17, UnsubscribeEvent = 18, Event = 19,
}

Variants§

§

None = 0

Not used

§

Play = 1

Sender message to play media content, body is v3::PlayMessage

§

Pause = 2

Sender message to pause media content, no body

§

Resume = 3

Sender message to resume media content, no body

§

Stop = 4

Sender message to stop media content, no body

§

Seek = 5

Sender message to seek, body is SeekMessage

§

PlaybackUpdate = 6

Receiver message to notify an updated playback state, body is v3::PlaybackUpdateMessage

§

VolumeUpdate = 7

Receiver message to notify when the volume has changed, body is VolumeUpdateMessage

§

SetVolume = 8

Sender message to change volume, body is SetVolumeMessage

§

PlaybackError = 9

Server message to notify the sender a playback error happened, body is PlaybackErrorMessage

§

SetSpeed = 10

Sender message to change playback speed, body is SetSpeedMessage

§

Version = 11

Message to notify the other of the current version, body is VersionMessage

§

Ping = 12

Message to get the other party to pong, no body

§

Pong = 13

Message to respond to a ping from the other party, no body

§

Initial = 14

Message to notify the other party of device information and state, body is InitialSenderMessage if receiver or v3::InitialReceiverMessage if sender

§

PlayUpdate = 15

Receiver message to notify all senders when any device has sent a v3::PlayMessage, body is v3::PlayUpdateMessage

§

SetPlaylistItem = 16

Sender message to set the item index in a playlist to play content from, body is v3::SetPlaylistItemMessage

§

SubscribeEvent = 17

Sender message to subscribe to a receiver event, body is v3::SubscribeEventMessage

§

UnsubscribeEvent = 18

Sender message to unsubscribe to a receiver event, body is v3::UnsubscribeEventMessage

§

Event = 19

Receiver message to notify when a sender subscribed event has occurred, body is v3::EventMessage

Trait Implementations§

Source§

impl Clone for Opcode

Source§

fn clone(&self) -> Opcode

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Opcode

Source§

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

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

impl PartialEq for Opcode

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl TryFrom<u8> for Opcode

Source§

type Error = TryFromByteError

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

fn try_from(value: u8) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl Copy for Opcode

Source§

impl StructuralPartialEq for Opcode

Auto Trait Implementations§

§

impl Freeze for Opcode

§

impl RefUnwindSafe for Opcode

§

impl Send for Opcode

§

impl Sync for Opcode

§

impl Unpin for Opcode

§

impl UnwindSafe for Opcode

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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.