[][src]Macro lighthouse::state

macro_rules! state {
    ($($i:ident:$v:expr), *) => { ... };
    (nonref; $($i:ident:$v:expr),*) => { ... };
    (from: $state:expr; $($i:ident:$v:expr),*) => { ... };
}

Super useful macro to create SendableState

use lighthouse::{lights::*, state};
// Usage examples
// Returns a reference, most useful as a default
let sendable_state: &SendableState = state!(on: true, xy: [1.0, 0.0]);

// Returns a value, still useful.
let sendable_state: SendableState = state!(nonref; on: true, xy: [1.0, 0.0]);