[][src]Struct iso8583_rs::iso8583::iso_spec::IsoMsg

pub struct IsoMsg {
    pub spec: &'static Spec,
    pub msg: &'static MessageSegment,
    pub fd_map: HashMap<String, Vec<u8>>,
    pub bmp: Bitmap,
}

This struct represents a parsed message for a given spec

Fields

spec: &'static Specmsg: &'static MessageSegment

The segment that the IsoMsg represents

fd_map: HashMap<String, Vec<u8>>

field data map - name to raw value

bmp: Bitmap

the bitmap on the iso message

Implementations

impl IsoMsg[src]

Operations on IsoMsg

pub fn spec(&self) -> &'static Spec[src]

pub fn bmp_child_value(&self, pos: u32) -> Result<String, IsoError>[src]

Returns the value of a field by position in the bitmap

pub fn get_field_value(&self, name: &String) -> Result<String, IsoError>[src]

Returns the value of a top level field like message_type

pub fn set(&mut self, name: &str, val: &str) -> Result<(), IsoError>[src]

sets a top-level field like message_type etc

pub fn set_on(&mut self, pos: u32, val: &str) -> Result<(), IsoError>[src]

Sets a field in the bitmap with the given value

pub fn echo_from(
    &mut self,
    req_msg: &IsoMsg,
    positions: &[u32]
) -> Result<(), IsoError>
[src]

Echoes (sets the value with the identical field in req_msg) for given positions in the bitmap

pub fn assemble(&self) -> Result<Vec<u8>, IsoError>[src]

Assembles the messages into a Vec or a IsoError on failure

pub fn set_pin(
    &mut self,
    pin: &str,
    pan: &str,
    cfg: &Config
) -> Result<(), IsoError>
[src]

Sets F52 based on provided clear pin, and format, key provided via cfg

pub fn set_mac(&mut self, cfg: &Config) -> Result<(), IsoError>[src]

Sets F64 or F128 based on algo, padding and key provided via cfg

Trait Implementations

impl Display for IsoMsg[src]

Auto Trait Implementations

impl !RefUnwindSafe for IsoMsg

impl Send for IsoMsg

impl Sync for IsoMsg

impl Unpin for IsoMsg

impl !UnwindSafe for IsoMsg

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> Same<T> for T

type Output = T

Should always be Self

impl<T> ToString for T where
    T: Display + ?Sized
[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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,