pub struct Ticket { /* private fields */ }Expand description
Represents a ticket handled by the JCM device.
Implementations§
Source§impl Ticket
impl Ticket
Sourcepub fn set_code(&mut self, code: &str) -> Result<()>
pub fn set_code(&mut self, code: &str) -> Result<()>
Sets the ASCII code of the Ticket.
code length must not exceed [MAX_LEN].
Sourcepub fn with_code(self, code: &str) -> Result<Self>
pub fn with_code(self, code: &str) -> Result<Self>
Builder function that sets the ASCII code of the Ticket.
code length must not exceed [MAX_LEN].
Sourcepub fn metadata(&self) -> TicketMetadata
pub fn metadata(&self) -> TicketMetadata
Gets the TicketMetadata for the Ticket.
Sourcepub fn from_bytes(buf: &[u8]) -> Result<Self>
pub fn from_bytes(buf: &[u8]) -> Result<Self>
Attempts to convert a byte buffer into a Ticket.
The buffer should only contain the ASCII-encode portion of the ticket.
Trait Implementations§
impl Eq for Ticket
impl StructuralPartialEq for Ticket
Auto Trait Implementations§
impl Freeze for Ticket
impl RefUnwindSafe for Ticket
impl Send for Ticket
impl Sync for Ticket
impl Unpin for Ticket
impl UnwindSafe for Ticket
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