Skip to main content

StrLike

Trait StrLike 

Source
pub trait StrLike: Sealed {
    // Required method
    fn from_utf8(&self) -> Option<&str>;
}

Required Methods§

Source

fn from_utf8(&self) -> Option<&str>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl StrLike for String

Available on crate feature alloc only.
Source§

impl StrLike for Vec<u8>

Available on crate feature alloc only.
Source§

impl StrLike for [u8]

Source§

impl StrLike for str

Source§

impl<'a> StrLike for &'a [u8]

Source§

impl<'a> StrLike for &'a str

Implementors§