[][src]Struct dbus::arg::Variant

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<dyn RefArg>>[src]

pub 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> Arg for Variant<T>[src]

fn arg_type() -> ArgType[src]

Deprecated:

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 Append for Variant<MessageItem>[src]

impl Append for Variant<Box<dyn RefArg>>[src]

impl<'a, T: Get<'a>> Get<'a> for Variant<T>[src]

impl<'a> Get<'a> for Variant<Iter<'a>>[src]

impl<T: RefArg> RefArg for Variant<T>[src]

impl<T: PartialEq> PartialEq<Variant<T>> for Variant<T>[src]

impl<T: Clone> Clone for Variant<T>[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Default for Variant<Box<dyn RefArg>>[src]

impl<T: Default> Default for Variant<T>[src]

impl<T: PartialOrd> PartialOrd<Variant<T>> for Variant<T>[src]

impl<T: Eq> Eq for Variant<T>[src]

impl<T: Ord> Ord for Variant<T>[src]

fn max(self, other: Self) -> Self1.21.0[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self1.21.0[src]

Compares and returns the minimum of two values. Read more

fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Restrict a value to a certain interval. Read more

impl<T: Copy> Copy for Variant<T>[src]

impl<T: Debug> Debug for Variant<T>[src]

impl<T: Hash> Hash for Variant<T>[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations

impl<T> Unpin for Variant<T> where
    T: Unpin

impl<T> Sync for Variant<T> where
    T: Sync

impl<T> Send for Variant<T> where
    T: Send

impl<T> RefUnwindSafe for Variant<T> where
    T: RefUnwindSafe

impl<T> UnwindSafe for Variant<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]