[][src]Struct launchy::DeviceCanvas

pub struct DeviceCanvas<Spec: DeviceSpec> { /* fields omitted */ }

A generic Canvas implementation for all launchpads, that relies on a DeviceSpec. You as a user of the library don't need to access this struct directly. Use the "Canvas" type aliases that each launchpad module provides, for example launchy::mk2::Canvas or launchy::s::Canvas.

Implementations

impl<Spec: DeviceSpec> DeviceCanvas<Spec>[src]

pub fn guess(
    callback: impl FnMut(CanvasMessage) + Send + 'static
) -> Result<Self, MidiError>
[src]

Create a new canvas by guessing both input and output MIDI connection by their name. If you need precise control over the specific MIDI connections that will be used, use [DeviceCanvas::from_ports] instead // TODO: not implemented yet

pub fn guess_polling() -> Result<(Self, DeviceCanvasPoller), MidiError>[src]

Trait Implementations

impl<Spec: DeviceSpec> Canvas for DeviceCanvas<Spec>[src]

impl<S: DeviceSpec> DrawTarget<Rgb888> for DeviceCanvas<S>[src]

type Error = ()

Error type to return when a drawing operation fails. Read more

impl<S: DeviceSpec> Index<Pad> for DeviceCanvas<S>[src]

type Output = Color

The returned type after indexing.

impl<S: DeviceSpec> IndexMut<Pad> for DeviceCanvas<S>[src]

Auto Trait Implementations

impl<Spec> !RefUnwindSafe for DeviceCanvas<Spec>

impl<Spec> Send for DeviceCanvas<Spec> where
    <Spec as DeviceSpec>::Output: Send

impl<Spec> !Sync for DeviceCanvas<Spec>

impl<Spec> Unpin for DeviceCanvas<Spec> where
    <Spec as DeviceSpec>::Output: Unpin

impl<Spec> !UnwindSafe for DeviceCanvas<Spec>

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.