[][src]Struct gvariant::Bool

#[repr(transparent)]pub struct Bool(_);

Type with same representation as GVariant "b" type

This is the type returned by:

gv!("b").cast(b"\0".as_aligned());

Rust's built in bool doesn't have the same representation as GVariant's, so we need our own type here. Rust's must either be 0x00 (false) or 0x01 (true), while with GVariant any value in the range 0x01..=0xFF is true.

Implementations

impl Bool[src]

pub fn to_bool(self) -> bool[src]

Trait Implementations

impl AlignOf for Bool[src]

type AlignOf = A1

impl AllBitPatternsValid for Bool[src]

impl Cast for Bool[src]

impl Clone for Bool[src]

impl Copy for Bool[src]

impl Debug for Bool[src]

impl Eq for Bool[src]

impl From<Bool> for bool[src]

impl PartialEq<Bool> for Bool[src]

impl PartialEq<Bool> for bool[src]

impl PartialEq<bool> for Bool[src]

impl RefCast for Bool[src]

type From = u8

impl<'_> SerializeTo<Bool> for &'_ Bool[src]

impl<'_> SerializeTo<Bool> for &'_ bool[src]

impl StructuralEq for Bool[src]

Auto Trait Implementations

impl RefUnwindSafe for Bool

impl Send for Bool

impl Sync for Bool

impl Unpin for Bool

impl UnwindSafe for Bool

Blanket Implementations

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

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

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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.