[][src]Enum ether_dream::dac::Playback

pub enum Playback {
    Idle,
    Prepared,
    Playing,
}

The DAC has one playback system, which buffers data and sends it to the analog output hardware at its current point rate. At any given time, the playback system is connected to a source. Usually the source is the network streamer, which uses this protocol. However, other sources exist, such as a built-in abstract generator and file playback from SD card. The playback system is in one of the following states.

Variants

Idle

The default state:

  • No points may be added to the buffer.
  • No output is generated.
  • All analog outputs are at 0v.
  • The shutter is controlled by the data source.
Prepared

The buffer will accept points.

The output is the same as the Idle state

Playing

Points are being sent to the output.

Methods

impl Playback[src]

pub fn from_protocol(state: u8) -> Option<Self>[src]

Create a Playback enum from the lower-level protocol representation.

Returns None if the given state byte is not known.

pub fn to_protocol(&self) -> u8[src]

Convert the LightEngine enum to its lower-level protocol representation.

Trait Implementations

impl Eq for Playback[src]

impl Copy for Playback[src]

impl PartialEq<Playback> for Playback[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

impl Clone for Playback[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Playback[src]

impl Hash for Playback[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations

impl Send for Playback

impl Sync for Playback

Blanket Implementations

impl<T, U> Into 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> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

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

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

The type returned in the event of a conversion error.