pub trait TextConversion {
// Required methods
fn new(line_terminator: Vec<u8>) -> Self;
fn from_utf8(&self, txt: &str) -> Option<Vec<u8>>;
fn to_utf8(&self, src: &[u8]) -> Option<String>;
// Provided method
fn is_terminated(bytes: &[u8], term: &[u8]) -> bool { ... }
}Required Methods§
fn new(line_terminator: Vec<u8>) -> Self
Provided Methods§
Sourcefn is_terminated(bytes: &[u8], term: &[u8]) -> bool
fn is_terminated(bytes: &[u8], term: &[u8]) -> bool
Does a given slice end with another slice
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".