Skip to main content

TextValue

Trait TextValue 

Source
pub trait TextValue: Text {
    // Required method
    fn as_bytes(&self) -> &[u8] ⓘ;
}
Expand description

String inputs whose UTF-8 proof survives until the complete write.

Required Methods§

Source

fn as_bytes(&self) -> &[u8] ⓘ

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<T: Text + AsRef<[u8]> + ?Sized> TextValue for T