Trait StringEncoding

Source
pub trait StringEncoding {
    // Required methods
    fn new() -> Self;
    fn get_encoded_length(string: &str) -> usize;
    fn encoded_length_to_byte_count(string: &str, length: usize) -> usize;
}

Required Methods§

Source

fn new() -> Self

Source

fn get_encoded_length(string: &str) -> usize

Source

fn encoded_length_to_byte_count(string: &str, length: usize) -> usize

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§