[−][src]Struct gvariant::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]
Trait Implementations
impl AlignOf for Bool
[src]
impl AllBitPatternsValid for Bool
[src]
impl Cast for Bool
[src]
fn default_ref() -> &'static Self
[src]
fn try_from_aligned_slice(
slice: &AlignedSlice<Self::AlignOf>
) -> Result<&Self, WrongSize>
[src]
slice: &AlignedSlice<Self::AlignOf>
) -> Result<&Self, WrongSize>
fn try_from_aligned_slice_mut(
slice: &mut AlignedSlice<Self::AlignOf>
) -> Result<&mut Self, WrongSize>
[src]
slice: &mut AlignedSlice<Self::AlignOf>
) -> Result<&mut Self, WrongSize>
fn from_aligned_slice(slice: &AlignedSlice<Self::AlignOf>) -> &Self
[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
fn ref_cast(_from: &Self::From) -> &Self
[src]
fn ref_cast_mut(_from: &mut Self::From) -> &mut Self
[src]
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,