[][src]Struct kstring::KStringRef

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

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

Implementations

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

pub fn new() -> Self[src]

Create a new empty KString.

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 to_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 KStringRef.

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

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

Trait Implementations

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

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

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

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

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

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

impl<'s> Copy for KStringRef<'s>[src]

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

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

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

type Target = str

The resulting type after dereferencing.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Auto Trait Implementations

impl<'s> RefUnwindSafe for KStringRef<'s>

impl<'s> Send for KStringRef<'s>

impl<'s> Sync for KStringRef<'s>

impl<'s> Unpin for KStringRef<'s>

impl<'s> UnwindSafe for KStringRef<'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.