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
sourceimpl Append for Variant<Box<dyn RefArg>>
impl Append for Variant<Box<dyn RefArg>>
sourcefn append_by_ref(&self, i: &mut IterAppend<'_>)
fn append_by_ref(&self, i: &mut IterAppend<'_>)
Performs the append operation by borrowing self.
sourcefn append(self, ia: &mut IterAppend<'_>)where
Self: Sized,
fn append(self, ia: &mut IterAppend<'_>)where
Self: Sized,
Performs the append operation by consuming self.
sourceimpl Append for Variant<MessageItem>
impl Append for Variant<MessageItem>
sourcefn append_by_ref(&self, i: &mut IterAppend<'_>)
fn append_by_ref(&self, i: &mut IterAppend<'_>)
Performs the append operation by borrowing self.
sourcefn append(self, ia: &mut IterAppend<'_>)where
Self: Sized,
fn append(self, ia: &mut IterAppend<'_>)where
Self: Sized,
Performs the append operation by consuming self.
sourceimpl<T: Arg + Append> Append for Variant<T>
impl<T: Arg + Append> Append for Variant<T>
sourcefn append_by_ref(&self, i: &mut IterAppend<'_>)
fn append_by_ref(&self, i: &mut IterAppend<'_>)
Performs the append operation by borrowing self.
sourcefn append(self, ia: &mut IterAppend<'_>)where
Self: Sized,
fn append(self, ia: &mut IterAppend<'_>)where
Self: Sized,
Performs the append operation by consuming self.
sourceimpl<T: Ord> Ord for Variant<T>
impl<T: Ord> Ord for Variant<T>
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl<T: PartialEq> PartialEq<Variant<T>> for Variant<T>
impl<T: PartialEq> PartialEq<Variant<T>> for Variant<T>
sourceimpl<T: PartialOrd> PartialOrd<Variant<T>> for Variant<T>
impl<T: PartialOrd> PartialOrd<Variant<T>> for Variant<T>
sourcefn partial_cmp(&self, other: &Variant<T>) -> Option<Ordering>
fn partial_cmp(&self, other: &Variant<T>) -> Option<Ordering>
1.0.0 · sourcefn 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 moresourceimpl<T: RefArg> RefArg for Variant<T>
impl<T: RefArg> RefArg for Variant<T>
sourcefn signature(&self) -> Signature<'static>
fn signature(&self) -> Signature<'static>
The corresponding D-Bus type signature for this type.
sourcefn append(&self, i: &mut IterAppend<'_>)
fn append(&self, i: &mut IterAppend<'_>)
Performs the append operation.
sourcefn 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
sourcefn 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
sourcefn 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
sourcefn 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
impl<T: Copy> Copy for Variant<T>
impl<T: Eq> Eq for Variant<T>
impl<T> StructuralEq for Variant<T>
impl<T> StructuralPartialEq for Variant<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for Variant<T>where
T: RefUnwindSafe,
impl<T> Send for Variant<T>where
T: Send,
impl<T> Sync for Variant<T>where
T: Sync,
impl<T> Unpin for Variant<T>where
T: Unpin,
impl<T> UnwindSafe for Variant<T>where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more