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§
Sourcefn get_slice_until(&mut self, length: usize) -> String
fn get_slice_until(&mut self, length: usize) -> String
Get a slice of the string until a specified length.
Sourcefn hex_to_ascii(&mut self) -> Result<String, FromHexError>
fn hex_to_ascii(&mut self) -> Result<String, FromHexError>
Convert a hex string to ASCII.
Sourcefn process_field(
&mut self,
field_number: u32,
length: u32,
name: &str,
mode: &Mode,
) -> String
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.
Sourcefn parse_private_ltv(&mut self) -> Result<Vec<LTV>, Box<dyn Error>>
fn parse_private_ltv(&mut self) -> Result<Vec<LTV>, Box<dyn Error>>
Parse LTV (Length, Tag, Value) format.
Sourcefn parse_private_tlv(&mut self) -> Result<Vec<PrivateTlv>, Box<dyn Error>>
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
impl StringManipulation for String
Source§fn get_slice_until(&mut self, length: usize) -> String
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>
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
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.