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]
impl Variant<Box<RefArg>>
pub fn new_refarg<'a>(i: &mut Iter<'a>) -> Option<Self>
[src]
pub fn new_refarg<'a>(i: &mut Iter<'a>) -> Option<Self>
Creates a new refarg from an Iter. Mainly for internal use.
Trait Implementations
impl<T: Copy> Copy for Variant<T>
[src]
impl<T: Copy> Copy for Variant<T>
impl<T: Clone> Clone for Variant<T>
[src]
impl<T: Clone> Clone for Variant<T>
fn clone(&self) -> Variant<T>
[src]
fn clone(&self) -> Variant<T>
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<T: Debug> Debug for Variant<T>
[src]
impl<T: Debug> Debug for Variant<T>
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<T: Hash> Hash for Variant<T>
[src]
impl<T: Hash> Hash for Variant<T>
fn hash<__HT: Hasher>(&self, state: &mut __HT)
[src]
fn hash<__HT: Hasher>(&self, state: &mut __HT)
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<T: Eq> Eq for Variant<T>
[src]
impl<T: Eq> Eq for Variant<T>
impl<T: PartialEq> PartialEq for Variant<T>
[src]
impl<T: PartialEq> PartialEq for Variant<T>
fn eq(&self, other: &Variant<T>) -> bool
[src]
fn eq(&self, other: &Variant<T>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Variant<T>) -> bool
[src]
fn ne(&self, other: &Variant<T>) -> bool
This method tests for !=
.
impl<T: Ord> Ord for Variant<T>
[src]
impl<T: Ord> Ord for Variant<T>
fn cmp(&self, other: &Variant<T>) -> Ordering
[src]
fn cmp(&self, other: &Variant<T>) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl<T: PartialOrd> PartialOrd for Variant<T>
[src]
impl<T: PartialOrd> PartialOrd for Variant<T>
fn partial_cmp(&self, other: &Variant<T>) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Variant<T>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Variant<T>) -> bool
[src]
fn lt(&self, other: &Variant<T>) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Variant<T>) -> bool
[src]
fn le(&self, other: &Variant<T>) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Variant<T>) -> bool
[src]
fn gt(&self, other: &Variant<T>) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Variant<T>) -> bool
[src]
fn ge(&self, other: &Variant<T>) -> bool
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]
impl<T> Arg for Variant<T>
const ARG_TYPE: ArgType
ARG_TYPE: ArgType = ArgType::Variant
The corresponding D-Bus argument type code.
fn signature() -> Signature<'static>
[src]
fn signature() -> Signature<'static>
The corresponding D-Bus type signature for this type.
fn arg_type() -> ArgType
[src]
fn arg_type() -> ArgType
: Use associated constant ARG_TYPE instead
The corresponding D-Bus argument type code; just returns ARG_TYPE. Read more
impl<T: Arg + Append> Append for Variant<T>
[src]
impl<T: Arg + Append> Append for Variant<T>
fn append(self, i: &mut IterAppend)
[src]
fn append(self, i: &mut IterAppend)
Performs the append operation.
impl Append for Variant<MessageItem>
[src]
impl Append for Variant<MessageItem>
fn append(self, i: &mut IterAppend)
[src]
fn append(self, i: &mut IterAppend)
Performs the append operation.
impl Append for Variant<Box<RefArg>>
[src]
impl Append for Variant<Box<RefArg>>
fn append(self, i: &mut IterAppend)
[src]
fn append(self, i: &mut IterAppend)
Performs the append operation.
impl<'a, T: Get<'a>> Get<'a> for Variant<T>
[src]
impl<'a, T: Get<'a>> Get<'a> for Variant<T>
impl<'a> Get<'a> for Variant<Iter<'a>>
[src]
impl<'a> Get<'a> for Variant<Iter<'a>>
impl<T: RefArg> RefArg for Variant<T>
[src]
impl<T: RefArg> RefArg for Variant<T>
fn arg_type(&self) -> ArgType
[src]
fn arg_type(&self) -> ArgType
The corresponding D-Bus argument type code.
fn signature(&self) -> Signature<'static>
[src]
fn signature(&self) -> Signature<'static>
The corresponding D-Bus type signature for this type.
fn append(&self, i: &mut IterAppend)
[src]
fn append(&self, i: &mut IterAppend)
Performs the append operation.
fn as_any(&self) -> &Any where
T: 'static,
[src]
fn as_any(&self) -> &Any where
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]
fn as_any_mut(&mut self) -> &mut Any where
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]
fn as_i64(&self) -> Option<i64>
Try to read the argument as an i64. Read more
fn as_u64(&self) -> Option<u64>
[src]
fn as_u64(&self) -> Option<u64>
Try to read the argument as an u64. Read more
fn as_f64(&self) -> Option<f64>
[src]
fn as_f64(&self) -> Option<f64>
Try to read the argument as an f64. Read more
fn as_str(&self) -> Option<&str>
[src]
fn as_str(&self) -> Option<&str>
Try to read the argument as a str. Read more
fn as_iter<'a>(&'a self) -> Option<Box<Iterator<Item = &'a RefArg> + 'a>>
[src]
fn as_iter<'a>(&'a self) -> Option<Box<Iterator<Item = &'a RefArg> + 'a>>
Try to read the argument as an iterator. Read more