[][src]Struct kstring::KStringCow

#[repr(transparent)]pub struct KStringCow<'s> { /* fields omitted */ }

A reference to a UTF-8 encoded, immutable string.

Implementations

impl<'s> KStringCow<'s>[src]

pub fn new() -> Self[src]

Create a new empty KStringCow.

pub fn from_boxed(other: Box<str>) -> Self[src]

Create an owned KStringCow.

pub fn from_string(other: String) -> Self[src]

Create an owned KStringCow.

pub fn from_ref(other: &'s str) -> Self[src]

Create a reference to a borrowed data.

pub fn from_static(other: &'static str) -> Self[src]

Create a reference to a 'static data.

pub fn as_ref(&self) -> KStringRef[src]

Get a reference to the KString.

pub fn into_owned(self) -> KString[src]

Clone the data into an owned-type.

pub fn as_str(&self) -> &str[src]

Extracts a string slice containing the entire KStringCow.

pub fn into_string(self) -> String[src]

Convert to a mutable string type, cloning the data if necessary.

pub fn into_boxed_str(self) -> Box<str>[src]

Convert to a mutable string type, cloning the data if necessary.

pub fn into_cow_str(self) -> Cow<'s, str>[src]

Convert to a Cow str

Trait Implementations

impl<'s> AsRef<[u8]> for KStringCow<'s>[src]

impl<'s> AsRef<OsStr> for KStringCow<'s>[src]

impl<'s> AsRef<Path> for KStringCow<'s>[src]

impl<'s> AsRef<str> for KStringCow<'s>[src]

impl<'s> Borrow<str> for KStringCow<'s>[src]

impl<'s> Clone for KStringCow<'s>[src]

impl<'s> Debug for KStringCow<'s>[src]

impl<'s> Default for KStringCow<'s>[src]

impl<'s> Deref for KStringCow<'s>[src]

type Target = str

The resulting type after dereferencing.

impl<'de, 's> Deserialize<'de> for KStringCow<'s>[src]

impl<'s> Display for KStringCow<'s>[src]

impl<'s> Eq for KStringCow<'s>[src]

impl<'s> From<&'s Box<str>> for KStringCow<'s>[src]

impl<'s> From<&'s KString> for KStringCow<'s>[src]

impl<'s> From<&'s KStringCow<'s>> for KStringRef<'s>[src]

impl<'s> From<&'s KStringCow<'s>> for KString[src]

impl<'s> From<&'s KStringRef<'s>> for KStringCow<'s>[src]

impl<'s> From<&'s String> for KStringCow<'s>[src]

impl<'s> From<&'s str> for KStringCow<'s>[src]

impl From<Box<str>> for KStringCow<'static>[src]

impl From<KString> for KStringCow<'static>[src]

impl<'s> From<KStringCow<'s>> for KString[src]

impl<'s> From<KStringRef<'s>> for KStringCow<'s>[src]

impl From<String> for KStringCow<'static>[src]

impl<'s> Hash for KStringCow<'s>[src]

impl<'s> Ord for KStringCow<'s>[src]

impl<'s> PartialEq<&'s str> for KStringCow<'s>[src]

impl<'s> PartialEq<KStringCow<'s>> for KStringCow<'s>[src]

impl<'s> PartialEq<String> for KStringCow<'s>[src]

impl<'s> PartialEq<str> for KStringCow<'s>[src]

impl<'s> PartialOrd<KStringCow<'s>> for KStringCow<'s>[src]

impl<'s> Serialize for KStringCow<'s>[src]

Auto Trait Implementations

impl<'s> RefUnwindSafe for KStringCow<'s>

impl<'s> Send for KStringCow<'s>

impl<'s> Sync for KStringCow<'s>

impl<'s> Unpin for KStringCow<'s>

impl<'s> UnwindSafe for KStringCow<'s>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.