Trait litrs::Buffer[][src]

pub trait Buffer: Sealed + Deref<Target = str> {
    type Cow: From<String> + AsRef<str> + Borrow<str> + Deref<Target = str>;
    type ByteCow: From<Vec<u8>> + AsRef<[u8]> + Borrow<[u8]> + Deref<Target = [u8]>;
}
Expand description

A shared or owned string buffer. Implemented for String and &str. Implementation detail.

This is trait is implementation detail of this library, cannot be implemented in other crates and is not subject to semantic versioning. litrs only gurantees that this trait is implemented for String and for<'a> &'a str.

Associated Types

type Cow: From<String> + AsRef<str> + Borrow<str> + Deref<Target = str>[src]

This is Cow<'static, str> for String, and Cow<'a, str> for &'a str.

type ByteCow: From<Vec<u8>> + AsRef<[u8]> + Borrow<[u8]> + Deref<Target = [u8]>[src]

This is Cow<'static, [u8]> for String, and Cow<'a, [u8]> for &'a str.

Implementations on Foreign Types

impl<'a> Buffer for &'a str[src]

type Cow = Cow<'a, str>

type ByteCow = Cow<'a, [u8]>

impl Buffer for String[src]

type Cow = Cow<'static, str>

type ByteCow = Cow<'static, [u8]>

Implementors