litrs::escape

Trait Escapee

Source
pub(crate) trait Escapee: Into<char> {
    const SUPPORTS_UNICODE: bool;

    // Required methods
    fn from_byte(b: u8) -> Self;
    fn from_char(c: char) -> Self;
}

Required Associated Constants§

Required Methods§

Source

fn from_byte(b: u8) -> Self

Source

fn from_char(c: char) -> Self

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.

Implementations on Foreign Types§

Source§

impl Escapee for char

Source§

const SUPPORTS_UNICODE: bool = true

Source§

fn from_byte(b: u8) -> Self

Source§

fn from_char(c: char) -> Self

Source§

impl Escapee for u8

Source§

const SUPPORTS_UNICODE: bool = false

Source§

fn from_byte(b: u8) -> Self

Source§

fn from_char(_: char) -> Self

Implementors§