Trait multistr::StrLike[][src]

pub trait StrLike: Len + ToOwned + DefaultRef + 'static {
    type Data: ?Sized + StrData + ToOwned<Owned = Self::OwnedData> + 'static;
    type OwnedData: OwnsStrData<Self::Data> + Borrow<Self::Data>;
    type ConvError: Display;
    fn to_data(&self) -> &Self::Data;
fn from_data(data: &Self::Data) -> Result<&Self, Self::ConvError>;
unsafe fn from_data_unchecked(data: &Self::Data) -> &Self; }

String-like container.

Associated Types

Data backing this string.

Owned data.

Error that comes up when converting data back into a string.

Required Methods

Converts this string into its data backend.

Coerces a string from its backend data, performing validation if necessary.

Similar to from_data, ignoring validity checking.

Implementations on Foreign Types

impl<T: 'static + Copy> StrLike for [T]
[src]

impl StrLike for str
[src]

impl StrLike for CStr
[src]

Implementors