[][src]Struct keebrs::core::Core

pub struct Core<N, U, T, S, O> { /* fields omitted */ }

The core keyboard manager

Implementations

impl<N, U, T, S, O> Core<N, U, T, S, O> where
    T: Stream + Unpin,
    S: ScanStateful + Unpin
[src]

pub fn new(
    my_type: &str,
    translator: Translator,
    net: N,
    usb_sink: U,
    timer: T,
    scanner: S
) -> Core<N, U, T, S, O> where
    U: Future<Output = O>, 
[src]

Create a new keyboard core

pub async fn run<'_>(&'_ mut self) where
    U: Future<Output = O> + Unpin,
    O: Sink<Translated> + Unpin,
    N: Net<Msg> + Unpin,
    <N as Sink<Msg<Msg>>>::Error: Debug
[src]

Run in secondary mode

pub async fn run_secondary<'_>(&'_ mut self) where
    N: NetSend<Msg> + NetRecv<Msg> + Unpin
[src]

Run in secondary mode

pub async fn run_primary<'_>(&'_ mut self) where
    O: Sink<Translated> + Unpin,
    N: Net<Msg> + Unpin,
    <N as Sink<Msg<Msg>>>::Error: Debug
[src]

Run in primary mode

Auto Trait Implementations

impl<N, U, T, S, O> Send for Core<N, U, T, S, O> where
    N: Send,
    O: Send,
    S: Send,
    T: Send,
    U: Send

impl<N, U, T, S, O> Sync for Core<N, U, T, S, O> where
    N: Sync,
    O: Sync,
    S: Sync,
    T: Sync,
    U: Sync

impl<N, U, T, S, O> Unpin for Core<N, U, T, S, O> where
    N: Unpin,
    O: Unpin,
    S: Unpin,
    T: Unpin,
    U: Unpin

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> Same<T> for T

type Output = T

Should always be Self

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.