pub enum PrinterConnectionData {
Usb {
vendor_id: u16,
product_id: u16,
endpoint: Option<u8>,
timeout: Duration,
},
Network {
_host: String,
_port: u16,
},
Terminal,
}
Expand description
Available connections with the printer
Determines the kind of connection that will be sustained with the printer. At the moment, only Usb and Terminal are implemented. Try not to use this enum directly, use the builder pattern instead (using the usb_builder or usb_builder methods. network_builder
soon to be available).
Variants§
Usb
Usb connection
Fields
Network
Network connection (not implemented yet)
Terminal
Terminal printer, used for really simple previews.
Trait Implementations§
Source§impl Clone for PrinterConnectionData
impl Clone for PrinterConnectionData
Source§fn clone(&self) -> PrinterConnectionData
fn clone(&self) -> PrinterConnectionData
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for PrinterConnectionData
impl RefUnwindSafe for PrinterConnectionData
impl Send for PrinterConnectionData
impl Sync for PrinterConnectionData
impl Unpin for PrinterConnectionData
impl UnwindSafe for PrinterConnectionData
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more