[−][src]Struct zvariant::Str
A string wrapper.
This is used for keeping strings in a Value
. API is provided to convert from, and to a
&str
and String
.
Implementations
impl<'a> Str<'a>
[src]
pub fn as_str(&self) -> &str
[src]
The underlying string.
pub fn to_owned(&self) -> Str<'static>
[src]
Creates an owned clone of self
.
Trait Implementations
impl<'a> Basic for Str<'a>
[src]
const SIGNATURE_CHAR: char
[src]
const SIGNATURE_STR: &'static str
[src]
const ALIGNMENT: usize
[src]
fn alignment(format: EncodingFormat) -> usize
[src]
impl<'a> Clone for Str<'a>
[src]
impl<'a> Debug for Str<'a>
[src]
impl<'a> Deref for Str<'a>
[src]
impl<'de: 'a, 'a> Deserialize<'de> for Str<'a>
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl<'a> Display for Str<'a>
[src]
impl<'a> Eq for Str<'a>
[src]
impl<'a> From<&'a Str<'a>> for &'a str
[src]
impl<'a> From<&'a String> for Str<'a>
[src]
impl<'a> From<&'a str> for Str<'a>
[src]
impl<'a> From<Str<'a>> for String
[src]
impl<'a> From<String> for Str<'a>
[src]
impl<'a> Hash for Str<'a>
[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<'a, '_> PartialEq<&'_ str> for Str<'a>
[src]
impl<'a> PartialEq<Str<'a>> for Str<'a>
[src]
impl<'a> Serialize for Str<'a>
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'a> StructuralEq for Str<'a>
[src]
impl<'a> StructuralPartialEq for Str<'a>
[src]
impl<'a> TryFrom<&'a Value<'a>> for &'a Str<'a>
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(value: &'a Value<'a>) -> Result<Self, Self::Error>
[src]
impl<'a> TryFrom<&'a Value<'a>> for Str<'a>
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(value: &'a Value<'_>) -> Result<Self, Self::Error>
[src]
impl<'a> TryFrom<Value<'a>> for Str<'a>
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(value: Value<'a>) -> Result<Self, Self::Error>
[src]
impl<'a> Type for Str<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for Str<'a>
impl<'a> Send for Str<'a>
impl<'a> Sync for Str<'a>
impl<'a> Unpin for Str<'a>
impl<'a> UnwindSafe for Str<'a>
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>,