[][src]Struct kstring::KString

#[repr(transparent)]pub struct KString { /* fields omitted */ }

A UTF-8 encoded, immutable string.

Implementations

impl KString[src]

pub fn new() -> Self[src]

Create a new empty KString.

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

Create an owned KString.

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

Create an owned KString.

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

Create an owned KString optimally from a reference.

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 as_str(&self) -> &str[src]

Extracts a string slice containing the entire KString.

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<'static, str>[src]

Convert to a Cow str

Trait Implementations

impl AsRef<[u8]> for KString[src]

impl AsRef<OsStr> for KString[src]

impl AsRef<Path> for KString[src]

impl AsRef<str> for KString[src]

impl Borrow<str> for KString[src]

impl Clone for KString[src]

impl Debug for KString[src]

impl Default for KString[src]

impl Deref for KString[src]

type Target = str

The resulting type after dereferencing.

impl<'de> Deserialize<'de> for KString[src]

impl Display for KString[src]

impl Eq for KString[src]

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

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

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

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

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

impl From<&'static str> for KString[src]

impl From<Box<str>> for KString[src]

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

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

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

impl From<String> for KString[src]

impl Hash for KString[src]

impl Ord for KString[src]

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

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

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

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

impl PartialOrd<KString> for KString[src]

impl Serialize for KString[src]

Auto Trait Implementations

impl RefUnwindSafe for KString

impl Send for KString

impl Sync for KString

impl Unpin for KString

impl UnwindSafe for KString

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.