iso8583_parser

Trait StringManipulation

Source
pub trait StringManipulation {
    // Required methods
    fn get_slice_until(&mut self, length: usize) -> String;
    fn hex_to_ascii(&mut self) -> Result<String, FromHexError>;
    fn process_field(
        &mut self,
        field_number: u32,
        length: u32,
        name: &str,
        mode: &Mode,
    ) -> String;
    fn parse_private_ltv(&mut self) -> Result<Vec<LTV>, Box<dyn Error>>;
    fn parse_private_tlv(&mut self) -> Result<Vec<PrivateTlv>, Box<dyn Error>>;
}
Expand description

Trait for string manipulation operations.

Required Methods§

Source

fn get_slice_until(&mut self, length: usize) -> String

Get a slice of the string until a specified length.

Source

fn hex_to_ascii(&mut self) -> Result<String, FromHexError>

Convert a hex string to ASCII.

Source

fn process_field( &mut self, field_number: u32, length: u32, name: &str, mode: &Mode, ) -> String

Process a field based on field number, length, and name.

Source

fn parse_private_ltv(&mut self) -> Result<Vec<LTV>, Box<dyn Error>>

Parse LTV (Length, Tag, Value) format.

Source

fn parse_private_tlv(&mut self) -> Result<Vec<PrivateTlv>, Box<dyn Error>>

Parse Private TLV format

Implementations on Foreign Types§

Source§

impl StringManipulation for String

Source§

fn get_slice_until(&mut self, length: usize) -> String

Get a slice of the string until a specified length.

Source§

fn hex_to_ascii(&mut self) -> Result<String, FromHexError>

Convert a hex string to ASCII.

Source§

fn process_field( &mut self, field_number: u32, length: u32, name: &str, mode: &Mode, ) -> String

Process a field based on field number, length, and name.

Source§

fn parse_private_ltv(&mut self) -> Result<Vec<LTV>, Box<dyn Error>>

Source§

fn parse_private_tlv(&mut self) -> Result<Vec<PrivateTlv>, Box<dyn Error>>

Implementors§