pub enum Device {
X714(X714),
R700(R700),
}Expand description
Wrapper de enum em torno de todos os tipos de device suportados.
Clone é barato — todos os tipos usam Arc internamente.
Variants§
Implementations§
Source§impl Device
impl Device
pub fn name(&self) -> &str
pub fn device_type(&self) -> &'static str
pub fn is_connected(&self) -> bool
pub fn is_reading(&self) -> bool
pub fn serial_number(&self) -> Option<String>
pub fn connect_instruction(&self) -> String
pub fn set_event_handler(&mut self, handler: SharedEventHandler)
pub async fn connect(&self)
pub async fn close(&self)
pub async fn start_inventory(&self) -> Result<(), String>
pub async fn stop_inventory(&self) -> Result<(), String>
pub async fn write_epc( &self, target_identifier: Option<&str>, target_value: Option<&str>, new_epc: &str, password: &str, ) -> Result<(), String>
pub async fn write_gpo( &self, pin: u8, state: bool, control: &str, time_ms: u64, ) -> Result<(), String>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Device
impl !RefUnwindSafe for Device
impl Send for Device
impl Sync for Device
impl Unpin for Device
impl UnsafeUnpin for Device
impl !UnwindSafe for Device
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more