Trait zifu::filename_decoder::IDecoder [−][src]
pub trait IDecoder {
fn to_string_lossless(&self, input: &[u8]) -> Option<String>;
fn to_string_lossy(&self, input: &[u8]) -> String;
fn encoding_name(&self) -> &str;
fn can_decode(&self, input: &[u8]) -> bool { ... }
}
Expand description
Trait (interface) of decoder
Required methods
Converts to UTF-8 String
only if possible completely
Arguments
input
- sequence of bytes that may represent a string
Converts to UTF-8 String
by force (filling with replacement characters)
Arguments
input
- sequence of bytes that may represent a string
fn encoding_name(&self) -> &str
fn encoding_name(&self) -> &str
Returns the name of the encoding that the decoder uses
Provided methods
Implementations
Returns native OEM code pages for the current locale
Supported: CJKV / Thai / IBM OEM