[−][src]Struct talktosc::response::Response
We can parse the output of sendapdu
function into a Response
structure. The first thing we
should check if the response is_okay
or if there are more bytes watiting for us to read.
Fields
data: Vec<u8>
sw1: u8
sw2: u8
Implementations
impl Response
[src]
pub fn new(input: Vec<u8>) -> Result<Self, TalktoSCError>
[src]
Creates a new Response
structure.
pub fn is_okay(&self) -> bool
[src]
Tells if the response is okay (0x90 0x00) or not.
pub fn get_data(&self) -> Vec<u8>
[src]
Returns a cloned copy of the data returned from card.
pub fn availble_response(&self) -> Option<u8>
[src]
Returns Option
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Response
[src]
impl Send for Response
[src]
impl Sync for Response
[src]
impl Unpin for Response
[src]
impl UnwindSafe for Response
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut 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.
pub 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>,