[−][src]Struct kstring::KString
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]
impl<'de> Deserialize<'de> for KString
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
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]
fn from(other: &'s KStringCow<'s>) -> Self
[src]
impl<'s> From<&'s KStringRef<'s>> for KString
[src]
fn from(other: &'s KStringRef<'s>) -> Self
[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]
fn from(other: KStringCow<'s>) -> Self
[src]
impl<'s> From<KStringRef<'s>> for KString
[src]
fn from(other: KStringRef<'s>) -> Self
[src]
impl From<String> for KString
[src]
impl Hash for KString
[src]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for KString
[src]
fn cmp(&self, other: &Self) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[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]
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool
1.0.0[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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,