[−][src]Struct hid_io::device::HIDIOMailbox
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]
nodes: Arc<RwLock<Vec<Endpoint>>>,
incoming: Receiver<HIDIOMessage>,
outgoing: Sender<HIDIOMessage>
) -> HIDIOMailbox
pub fn from_sender(
dest: Sender<HIDIOMessage>,
nodes: Arc<RwLock<Vec<Endpoint>>>
) -> (Sender<HIDIOMessage>, HIDIOMailbox)
[src]
dest: Sender<HIDIOMessage>,
nodes: Arc<RwLock<Vec<Endpoint>>>
) -> (Sender<HIDIOMessage>, HIDIOMailbox)
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]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,