[][src]Struct hid_io::device::HIDIOMailbox

pub struct HIDIOMailbox {
    pub nodes: Arc<RwLock<Vec<Endpoint>>>,
    // some fields omitted
}

The userspace end of the HIDIO message system

Can receive all incoming messages, or send a new message to a device by id. Provides utility functions to construct common messages.

Fields

nodes: Arc<RwLock<Vec<Endpoint>>>

Methods

impl HIDIOMailbox[src]

pub fn new(
    nodes: Arc<RwLock<Vec<Endpoint>>>,
    incoming: Receiver<HIDIOMessage>,
    outgoing: Sender<HIDIOMessage>
) -> HIDIOMailbox
[src]

pub fn from_sender(
    dest: Sender<HIDIOMessage>,
    nodes: Arc<RwLock<Vec<Endpoint>>>
) -> (Sender<HIDIOMessage>, HIDIOMailbox)
[src]

pub fn send_packet(&self, device: String, packet: HIDIOPacketBuffer)[src]

pub fn recv(&self) -> HIDIOMessage[src]

pub fn recv_psuedoblocking(&self) -> Option<HIDIOMessage>[src]

pub fn iter(&self) -> Iter<HIDIOMessage>[src]

pub fn send_sync(&self, device: String)[src]

pub fn send_ack(&self, device: String, _id: u32, data: Vec<u8>)[src]

pub fn send_nack(&self, device: String, id: u32, data: Vec<u8>)[src]

pub fn send_command(&self, device: String, id: HIDIOCommandID, data: Vec<u8>)[src]

Auto Trait Implementations

impl Send for HIDIOMailbox

impl !Sync for HIDIOMailbox

impl Unpin for HIDIOMailbox

impl !UnwindSafe for HIDIOMailbox

impl !RefUnwindSafe for HIDIOMailbox

Blanket Implementations

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

impl<T> From<T> for 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.

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

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

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

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]