Struct gmime::VariantType [−]
pub struct VariantType { /* fields omitted */ }
Describes Variant
types.
The Variant
type system (based on the D-Bus one) describes types with
"type strings". VariantType
is an owned immutable type string (you can
think of it as a Box<str>
statically guaranteed to be a valid type
string), &VariantTy
is a borrowed one (like &str
).
Methods
impl VariantType
impl VariantType
pub fn new(type_string: &str) -> Result<VariantType, ()>
pub fn new(type_string: &str) -> Result<VariantType, ()>
Tries to create a VariantType
from a string slice.
Returns Ok
if the string is a valid type string, Err
otherwise.
Methods from Deref<Target = VariantTy>
Trait Implementations
impl Sync for VariantType
impl Sync for VariantType
impl Hash for VariantType
impl Hash for VariantType
fn hash<H>(&self, state: &mut H) where
H: Hasher,
fn hash<H>(&self, state: &mut H) where
H: Hasher,
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<'a> Into<Cow<'a, VariantTy>> for VariantType
impl<'a> Into<Cow<'a, VariantTy>> for VariantType
impl<'a, 'b> PartialEq<VariantType> for String
impl<'a, 'b> PartialEq<VariantType> for String
fn eq(&self, other: &VariantType) -> bool
fn eq(&self, other: &VariantType) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl<'a, 'b> PartialEq<str> for VariantType
impl<'a, 'b> PartialEq<str> for VariantType
fn eq(&self, other: &str) -> bool
fn eq(&self, other: &str) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl<'a, 'b> PartialEq<&'a VariantTy> for VariantType
impl<'a, 'b> PartialEq<&'a VariantTy> for VariantType
fn eq(&self, other: &&'a VariantTy) -> bool
fn eq(&self, other: &&'a VariantTy) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl<'a, 'b> PartialEq<VariantType> for VariantTy
impl<'a, 'b> PartialEq<VariantType> for VariantTy
fn eq(&self, other: &VariantType) -> bool
fn eq(&self, other: &VariantType) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl<'a, 'b> PartialEq<String> for VariantType
impl<'a, 'b> PartialEq<String> for VariantType
fn eq(&self, other: &String) -> bool
fn eq(&self, other: &String) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl<'a, 'b> PartialEq<VariantType> for str
impl<'a, 'b> PartialEq<VariantType> for str
fn eq(&self, other: &VariantType) -> bool
fn eq(&self, other: &VariantType) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl<'a, 'b> PartialEq<VariantType> for Cow<'a, VariantTy>
impl<'a, 'b> PartialEq<VariantType> for Cow<'a, VariantTy>
fn eq(&self, other: &VariantType) -> bool
fn eq(&self, other: &VariantType) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl<'a, 'b> PartialEq<&'a str> for VariantType
impl<'a, 'b> PartialEq<&'a str> for VariantType
fn eq(&self, other: &&'a str) -> bool
fn eq(&self, other: &&'a str) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl<'a, 'b> PartialEq<VariantType> for &'a str
impl<'a, 'b> PartialEq<VariantType> for &'a str
fn eq(&self, other: &VariantType) -> bool
fn eq(&self, other: &VariantType) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl<'a, 'b> PartialEq<Cow<'a, VariantTy>> for VariantType
impl<'a, 'b> PartialEq<Cow<'a, VariantTy>> for VariantType
fn eq(&self, other: &Cow<'a, VariantTy>) -> bool
fn eq(&self, other: &Cow<'a, VariantTy>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl<'a, 'b> PartialEq<VariantType> for &'a VariantTy
impl<'a, 'b> PartialEq<VariantType> for &'a VariantTy
fn eq(&self, other: &VariantType) -> bool
fn eq(&self, other: &VariantType) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl PartialEq<VariantType> for VariantType
impl PartialEq<VariantType> for VariantType
fn eq(&self, other: &VariantType) -> bool
fn eq(&self, other: &VariantType) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl<'a, 'b> PartialEq<VariantTy> for VariantType
impl<'a, 'b> PartialEq<VariantTy> for VariantType
fn eq(&self, other: &VariantTy) -> bool
fn eq(&self, other: &VariantTy) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl Eq for VariantType
impl Eq for VariantType
impl Drop for VariantType
impl Drop for VariantType
impl Borrow<VariantTy> for VariantType
impl Borrow<VariantTy> for VariantType
impl Clone for VariantType
impl Clone for VariantType
fn clone(&self) -> VariantType
fn clone(&self) -> VariantType
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for VariantType
impl Debug for VariantType
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl Display for VariantType
impl Display for VariantType
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl Deref for VariantType
impl Deref for VariantType
type Target = VariantTy
The resulting type after dereferencing.
fn deref(&self) -> &VariantTy
fn deref(&self) -> &VariantTy
Dereferences the value.
impl Send for VariantType
impl Send for VariantType