Struct Imsi
pub struct Imsi(Digits<15>);Expand description
IMSI of a SIM application.
The IMSI has at most 15 decimal digits.
Tuple Fields§
§0: Digits<15>Implementations§
§impl Imsi
impl Imsi
const EF_MAX_LEN: u8 = 8
const EF_MAX_LEN: u8 = 8
Longest value of the length byte.
pub fn from_ef(ef: &[u8]) -> Result<Self, EfError>
pub fn from_ef(ef: &[u8]) -> Result<Self, EfError>
Decodes the content of EF 6F07 (EF IMSI, TS 31.102 and TS 51.011).
The first byte is the number of bytes that follow. The high nibble of
the second byte is the first digit. Its low nibble contains the identity
type and the parity. Every further byte contains two digits with the low
nibble first. For an even number of digits the last high nibble is the
filler F. Bytes after the IMSI are ignored.
§Errors
Returns an error if the length byte is invalid, the file is shorter than the length byte says, the identity nibble is wrong or a nibble is not a decimal digit.
Trait Implementations§
impl Copy for Imsi
impl Eq for Imsi
impl StructuralPartialEq for Imsi
Auto Trait Implementations§
impl Freeze for Imsi
impl RefUnwindSafe for Imsi
impl Send for Imsi
impl Sync for Imsi
impl Unpin for Imsi
impl UnsafeUnpin for Imsi
impl UnwindSafe for Imsi
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