[][src]Struct small_morse::Action

pub struct Action {
    pub duration: u8,
    pub delay_type: DelayType,
    pub state: State,
}

An Action is how the library tells you what to signal.

In general, this library affords lots of flexibility in how the morse code is transmitted by leaving it entirely up to the user. Instead of doing it for you, it supplies an iterator of actions that need to be done.

In order to send morse code, you need to turn a signal on and off for different lengths of time. An Action, correspondingly, has two parts: the state (whether it is on or off) and the duration.

Fields

duration: u8

The duration of an action is measured in units of one dot-length. A dot-length is typically around 50 to 100 milliseconds or so.

delay_type: DelayType

Whether the duration should use the regular speed or the Farnsworth speed

state: State

Whether it should be on or off

Trait Implementations

impl Clone for Action[src]

impl Copy for Action[src]

impl Debug for Action[src]

impl Eq for Action[src]

impl Hash for Action[src]

impl PartialEq<Action> for Action[src]

impl StructuralEq for Action[src]

impl StructuralPartialEq for Action[src]

Auto Trait Implementations

impl Send for Action

impl Sync for Action

impl Unpin for Action

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, 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.