Struct dbus::arg::Variant
[−]
[src]
pub struct Variant<T>(pub T);
A simple wrapper to specify a D-Bus variant.
See the argument guide and module level documentation for details and examples.
Methods
impl Variant<Box<RefArg>>
[src]
fn new_refarg<'a>(i: &mut Iter<'a>) -> Option<Self>
[src]
Creates a new refarg from an Iter. Mainly for internal use.
Trait Implementations
impl<T: Copy> Copy for Variant<T>
[src]
impl<T: Clone> Clone for Variant<T>
[src]
fn clone(&self) -> Variant<T>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<T: Debug> Debug for Variant<T>
[src]
impl<T: Hash> Hash for Variant<T>
[src]
fn hash<__HT: Hasher>(&self, __arg_0: &mut __HT)
[src]
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]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<T: Eq> Eq for Variant<T>
[src]
impl<T: PartialEq> PartialEq for Variant<T>
[src]
fn eq(&self, __arg_0: &Variant<T>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Variant<T>) -> bool
[src]
This method tests for !=
.
impl<T: Ord> Ord for Variant<T>
[src]
fn cmp(&self, __arg_0: &Variant<T>) -> Ordering
[src]
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
[src]
ord_max_min
)Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
[src]
ord_max_min
)Compares and returns the minimum of two values. Read more
impl<T: PartialOrd> PartialOrd for Variant<T>
[src]
fn partial_cmp(&self, __arg_0: &Variant<T>) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &Variant<T>) -> bool
[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &Variant<T>) -> bool
[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &Variant<T>) -> bool
[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &Variant<T>) -> bool
[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl<T> Arg for Variant<T>
[src]
fn arg_type() -> ArgType
[src]
The corresponding D-Bus argument type code.
fn signature() -> Signature<'static>
[src]
The corresponding D-Bus type signature for this type.
impl<T: Arg + Append> Append for Variant<T>
[src]
fn append(self, i: &mut IterAppend)
[src]
Performs the append operation.
impl Append for Variant<MessageItem>
[src]
fn append(self, i: &mut IterAppend)
[src]
Performs the append operation.
impl Append for Variant<Box<RefArg>>
[src]
fn append(self, i: &mut IterAppend)
[src]
Performs the append operation.
impl<'a, T: Get<'a>> Get<'a> for Variant<T>
[src]
impl<'a> Get<'a> for Variant<Iter<'a>>
[src]
impl<'a> Get<'a> for Variant<Box<RefArg>>
[src]
impl<T: RefArg> RefArg for Variant<T>
[src]
fn arg_type(&self) -> ArgType
[src]
The corresponding D-Bus argument type code.
fn signature(&self) -> Signature<'static>
[src]
The corresponding D-Bus type signature for this type.
fn append(&self, i: &mut IterAppend)
[src]
Performs the append operation.
fn as_any(&self) -> &Any where
T: 'static,
[src]
T: 'static,
Transforms this argument to Any (which can be downcasted to read the current value).
fn as_any_mut(&mut self) -> &mut Any where
T: 'static,
[src]
T: 'static,
Transforms this argument to Any (which can be downcasted to read the current value). Read more
fn as_i64(&self) -> Option<i64>
[src]
Try to read the argument as an i64.
fn as_str(&self) -> Option<&str>
[src]
Try to read the argument as a str.
fn as_iter<'a>(&'a self) -> Option<Box<Iterator<Item = &'a RefArg> + 'a>>
[src]
Try to read the argument as an iterator.