[−][src]Struct i8583::unpacker::Unpacker
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]
&mut self,
spec: &[Option<Spec>; 129]
) -> Result<&[Option<&'a [u8]>], String>
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]
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,
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, 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>,