Struct glib::VariantType [−][src]
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
[src]
impl VariantType
pub fn new(type_string: &str) -> Result<VariantType, ()>
[src]
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 Send for VariantType
[src]
impl Send for VariantType
impl Sync for VariantType
[src]
impl Sync for VariantType
impl Drop for VariantType
[src]
impl Drop for VariantType
impl Borrow<VariantTy> for VariantType
[src]
impl Borrow<VariantTy> for VariantType
impl Clone for VariantType
[src]
impl Clone for VariantType
fn clone(&self) -> VariantType
[src]
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 Deref for VariantType
[src]
impl Deref for VariantType
type Target = VariantTy
The resulting type after dereferencing.
fn deref(&self) -> &VariantTy
[src]
fn deref(&self) -> &VariantTy
Dereferences the value.
impl Debug for VariantType
[src]
impl Debug for VariantType
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Display for VariantType
[src]
impl Display for VariantType
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Hash for VariantType
[src]
impl Hash for VariantType
fn hash<H: Hasher>(&self, state: &mut H)
[src]
fn hash<H: Hasher>(&self, state: &mut H)
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
[src]
impl<'a> Into<Cow<'a, VariantTy>> for VariantType
impl StaticType for VariantType
[src]
impl StaticType for VariantType
fn static_type() -> Type
[src]
fn static_type() -> Type
Returns the type identifier of Self
.
impl SetValue for VariantType
[src]
impl SetValue for VariantType
impl SetValueOptional for VariantType
[src]
impl SetValueOptional for VariantType
unsafe fn set_value_optional(value: &mut Value, this: Option<&Self>)
[src]
unsafe fn set_value_optional(value: &mut Value, this: Option<&Self>)
impl<'a> FromValueOptional<'a> for VariantType
[src]
impl<'a> FromValueOptional<'a> for VariantType
unsafe fn from_value_optional(value: &'a Value) -> Option<Self>
[src]
unsafe fn from_value_optional(value: &'a Value) -> Option<Self>
impl PartialEq for VariantType
[src]
impl PartialEq for VariantType
fn eq(&self, other: &Self) -> bool
[src]
fn eq(&self, other: &Self) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl<'a, 'b> PartialEq<VariantTy> for VariantType
[src]
impl<'a, 'b> PartialEq<VariantTy> for VariantType
fn eq(&self, other: &VariantTy) -> bool
[src]
fn eq(&self, other: &VariantTy) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl<'a, 'b> PartialEq<VariantType> for VariantTy
[src]
impl<'a, 'b> PartialEq<VariantType> for VariantTy
fn eq(&self, other: &VariantType) -> bool
[src]
fn eq(&self, other: &VariantType) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl<'a, 'b> PartialEq<&'a VariantTy> for VariantType
[src]
impl<'a, 'b> PartialEq<&'a VariantTy> for VariantType
fn eq(&self, other: &&'a VariantTy) -> bool
[src]
fn eq(&self, other: &&'a VariantTy) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl<'a, 'b> PartialEq<VariantType> for &'a VariantTy
[src]
impl<'a, 'b> PartialEq<VariantType> for &'a VariantTy
fn eq(&self, other: &VariantType) -> bool
[src]
fn eq(&self, other: &VariantType) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl<'a, 'b> PartialEq<Cow<'a, VariantTy>> for VariantType
[src]
impl<'a, 'b> PartialEq<Cow<'a, VariantTy>> for VariantType
fn eq(&self, other: &Cow<'a, VariantTy>) -> bool
[src]
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
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl<'a, 'b> PartialEq<VariantType> for Cow<'a, VariantTy>
[src]
impl<'a, 'b> PartialEq<VariantType> for Cow<'a, VariantTy>
fn eq(&self, other: &VariantType) -> bool
[src]
fn eq(&self, other: &VariantType) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl<'a, 'b> PartialEq<str> for VariantType
[src]
impl<'a, 'b> PartialEq<str> for VariantType
fn eq(&self, other: &str) -> bool
[src]
fn eq(&self, other: &str) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl<'a, 'b> PartialEq<VariantType> for str
[src]
impl<'a, 'b> PartialEq<VariantType> for str
fn eq(&self, other: &VariantType) -> bool
[src]
fn eq(&self, other: &VariantType) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl<'a, 'b> PartialEq<&'a str> for VariantType
[src]
impl<'a, 'b> PartialEq<&'a str> for VariantType
fn eq(&self, other: &&'a str) -> bool
[src]
fn eq(&self, other: &&'a str) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl<'a, 'b> PartialEq<VariantType> for &'a str
[src]
impl<'a, 'b> PartialEq<VariantType> for &'a str
fn eq(&self, other: &VariantType) -> bool
[src]
fn eq(&self, other: &VariantType) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl<'a, 'b> PartialEq<String> for VariantType
[src]
impl<'a, 'b> PartialEq<String> for VariantType
fn eq(&self, other: &String) -> bool
[src]
fn eq(&self, other: &String) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl<'a, 'b> PartialEq<VariantType> for String
[src]
impl<'a, 'b> PartialEq<VariantType> for String
fn eq(&self, other: &VariantType) -> bool
[src]
fn eq(&self, other: &VariantType) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl Eq for VariantType
[src]
impl Eq for VariantType