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);
    fn parse_ltv(&mut self) -> Result<Vec<LTV>, 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)

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

source

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

Parse LTV (Length, Tag, Value) 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)

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

source§

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

Implementors§