AppInfoResp

Struct AppInfoResp 

Source
pub struct AppInfoResp<'a> {
    pub name: &'a str,
    pub version: &'a str,
    pub flags: AppFlags,
}
Expand description

Application information response APDU

Fields§

§name: &'a str

Application name

§version: &'a str

Application version

§flags: AppFlags

Application flags

Implementations§

Source§

impl<'a> AppInfoResp<'a>

Source

pub fn new(name: &'a str, version: &'a str, flags: AppFlags) -> Self

Create a new application version APDU

Trait Implementations§

Source§

impl<'a> Debug for AppInfoResp<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a> Decode<'a> for AppInfoResp<'a>

Source§

type Output = AppInfoResp<'a>

Output type (allows attaching lifetime bounds where required)
Source§

type Error = ApduError

Error type returned on parse error
Source§

fn decode(buff: &'a [u8]) -> Result<(Self::Output, usize), Self::Error>

Decode consumes a slice and returns an object and decoded length.
Source§

impl<'a> Encode for AppInfoResp<'a>

Source§

type Error = ApduError

Error type returned on parse error
Source§

fn encode_len(&self) -> Result<usize, Self::Error>

Calculate expected encoded length for an object
Source§

fn encode(&self, buff: &mut [u8]) -> Result<usize, Self::Error>

Encode method writes object data to the provided writer
Source§

impl<'a> PartialEq for AppInfoResp<'a>

Source§

fn eq(&self, other: &AppInfoResp<'a>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'a> StructuralPartialEq for AppInfoResp<'a>

Auto Trait Implementations§

§

impl<'a> Freeze for AppInfoResp<'a>

§

impl<'a> RefUnwindSafe for AppInfoResp<'a>

§

impl<'a> Send for AppInfoResp<'a>

§

impl<'a> Sync for AppInfoResp<'a>

§

impl<'a> Unpin for AppInfoResp<'a>

§

impl<'a> UnwindSafe for AppInfoResp<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<'a, T> DecodeExt<'a> for T
where T: Decode<'a>,

Source§

fn decode_iter(buff: &'a [u8]) -> DecodeIter<'a, Self::Output>

Helper to iterate over decodable objects in a sized buffer. Read more
Source§

impl<'a, T> EncodeExt<'a> for T
where T: Encode + 'a,

Source§

fn encode_iter( items: impl Iterator<Item = &'a Self>, buff: &mut [u8], ) -> Result<usize, Self::Error>

Helper to encode iterables
Source§

fn encode_buff<const N: usize>(&self) -> Result<([u8; N], usize), Self::Error>

Helper to encode to a fixed size buffer
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<'a, T> ApduBase<'a> for T
where T: EncDec<'a, ApduError>,

Source§

impl<'a, T, E> EncDec<'a, E> for T
where T: Decode<'a, Output = T, Error = E> + Encode<Error = E>,