Open kellerkindt opened 3 years ago
Currently each character string type has its own read_*/write_* fn which every Reader/Writer must implement
read_*
write_*
Reader
Writer
fn read_utf8string<C: utf8string::Constraint>(&mut self) -> Result<String, Self::Error>; fn read_ia5string<C: ia5string::Constraint>(&mut self) -> Result<String, Self::Error>; fn read_numeric_string<C: numericstring::Constraint>(&mut self) -> Result<String, Self::Error>; fn read_visible_string<C: visiblestring::Constraint>(&mut self) -> Result<String, Self::Error>; fn read_printable_string<C: printablestring::Constraint>( &mut self, ) -> Result<String, Self::Error>;
Consider a common fn (like read_characters?) and pass the Charset as (type) parameter? Same with the Utf8String, Ia5String, ... types.
read_characters
Utf8String
Ia5String
Currently each character string type has its own
read_*
/write_*
fn which everyReader
/Writer
must implementConsider a common fn (like
read_characters
?) and pass the Charset as (type) parameter? Same with theUtf8String
,Ia5String
, ... types.