[][src]Struct i8583::unpacker::Unpacker

pub struct Unpacker<'a> { /* fields omitted */ }

i8583::Unpacker type and associated functions for creating iso8583 messages.

Examples

use i8583::Unpacker;

let response = "080022380000008000009A0000070814102414102414102407082020XXXX";
let mut iso = Unpacker::new(response.as_bytes());
let fields = iso.unpack(&i8583::nibss::SPEC)
                .unwrap_or_else(|err_msg| panic!("{}", err_msg));

Implementations

impl<'a> Unpacker<'a>[src]

pub fn new(msg: &'a [u8]) -> Unpacker[src]

Create a new unpacker for the given iso message. The lifetime of the unpacker will be tied to that of the given message

pub fn unpack(
    &mut self,
    spec: &[Option<Spec>; 129]
) -> Result<&[Option<&'a [u8]>], String>
[src]

Unpack initialized message in new into array of slices using provided spec.

Auto Trait Implementations

impl<'a> RefUnwindSafe for Unpacker<'a>

impl<'a> Send for Unpacker<'a>

impl<'a> Sync for Unpacker<'a>

impl<'a> Unpin for Unpacker<'a>

impl<'a> UnwindSafe for Unpacker<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.