[−][src]Struct iso7816_tlv::simple::Tag
Tag for SIMPLE-TLV data as defined in [ISO7819-4].
The tag field consists of a single byte encoding a tag number from 1 to 254. The values '00' and 'FF' are invalid for tag fields.
Tags can be generated using the TryFrom trait from u8 or hex str.
Example
use std::convert::TryFrom; use iso7816_tlv::simple::Tag; assert!(Tag::try_from("80").is_ok()); assert!(Tag::try_from(8u8).is_ok()); assert!(Tag::try_from(0x80).is_ok()); assert!(Tag::try_from(127).is_ok()); assert!(Tag::try_from("er").is_err()); assert!(Tag::try_from("00").is_err()); assert!(Tag::try_from("ff").is_err());
Trait Implementations
impl Clone for Tag
[src]
impl PartialEq<Tag> for Tag
[src]
impl Debug for Tag
[src]
impl TryFrom<u8> for Tag
[src]
type Error = TlvError
The type returned in the event of a conversion error.
fn try_from(v: u8) -> Result<Self, TlvError>
[src]
impl<'_> TryFrom<&'_ str> for Tag
[src]
Auto Trait Implementations
impl Send for Tag
impl Unpin for Tag
impl Sync for Tag
impl RefUnwindSafe for Tag
impl UnwindSafe for Tag
Blanket Implementations
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.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From<T> for 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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,