pub struct Variant<T>(pub T);
Expand description
A simple wrapper to specify a D-Bus variant.
See the argument guide and module level documentation for details and examples.
Tuple Fields§
§0: T
Implementations§
Trait Implementations§
source§impl Append for Variant<Box<dyn RefArg>>
impl Append for Variant<Box<dyn RefArg>>
source§fn append_by_ref(&self, i: &mut IterAppend<'_>)
fn append_by_ref(&self, i: &mut IterAppend<'_>)
Performs the append operation by borrowing self.
source§fn append(self, ia: &mut IterAppend<'_>)where
Self: Sized,
fn append(self, ia: &mut IterAppend<'_>)where
Self: Sized,
Performs the append operation by consuming self.
source§impl Append for Variant<MessageItem>
impl Append for Variant<MessageItem>
source§fn append_by_ref(&self, i: &mut IterAppend<'_>)
fn append_by_ref(&self, i: &mut IterAppend<'_>)
Performs the append operation by borrowing self.
source§fn append(self, ia: &mut IterAppend<'_>)where
Self: Sized,
fn append(self, ia: &mut IterAppend<'_>)where
Self: Sized,
Performs the append operation by consuming self.
source§impl<T: Arg + Append> Append for Variant<T>
impl<T: Arg + Append> Append for Variant<T>
source§fn append_by_ref(&self, i: &mut IterAppend<'_>)
fn append_by_ref(&self, i: &mut IterAppend<'_>)
Performs the append operation by borrowing self.
source§fn append(self, ia: &mut IterAppend<'_>)where
Self: Sized,
fn append(self, ia: &mut IterAppend<'_>)where
Self: Sized,
Performs the append operation by consuming self.
source§impl<T: Ord> Ord for Variant<T>
impl<T: Ord> Ord for Variant<T>
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<T: PartialEq> PartialEq<Variant<T>> for Variant<T>
impl<T: PartialEq> PartialEq<Variant<T>> for Variant<T>
source§impl<T: PartialOrd> PartialOrd<Variant<T>> for Variant<T>
impl<T: PartialOrd> PartialOrd<Variant<T>> for Variant<T>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl<T: RefArg> RefArg for Variant<T>
impl<T: RefArg> RefArg for Variant<T>
source§fn signature(&self) -> Signature<'static>
fn signature(&self) -> Signature<'static>
The corresponding D-Bus type signature for this type.
source§fn append(&self, i: &mut IterAppend<'_>)
fn append(&self, i: &mut IterAppend<'_>)
Performs the append operation.
source§fn as_any(&self) -> &dyn Anywhere
T: 'static,
fn as_any(&self) -> &dyn Anywhere
T: 'static,
Transforms this argument to Any (which can be downcasted to read the current value). Read more
source§fn as_any_mut(&mut self) -> &mut dyn Anywhere
T: 'static,
fn as_any_mut(&mut self) -> &mut dyn Anywhere
T: 'static,
Transforms this argument to Any (which can be downcasted to read the current value). Read more
source§fn as_iter<'a>(
&'a self
) -> Option<Box<dyn Iterator<Item = &'a dyn RefArg> + 'a>>
fn as_iter<'a>(
&'a self
) -> Option<Box<dyn Iterator<Item = &'a dyn RefArg> + 'a>>
Try to read the argument as an iterator. Read more
source§fn box_clone(&self) -> Box<dyn RefArg + 'static>
fn box_clone(&self) -> Box<dyn RefArg + 'static>
Deep clone of the RefArg, causing the result to be ’static. Read more