Struct extendr_api::logical::Bool[][src]

pub struct Bool(pub i32);

Bool is a wrapper for i32 in the context of an R's tristate boolean. It can be TRUE, FALSE or NA_LOGICAL.

Implementations

impl Bool[src]

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

Convert this Bool to a bool. Note NA will be true.

pub fn from_bool(val: bool) -> Self[src]

Convert this construct a Bool from a rust boolean.

pub fn is_true(&self) -> bool[src]

Test if TRUE

pub fn is_false(&self) -> bool[src]

Test if FALSE

Trait Implementations

impl<'a> AsTypedSlice<'a, Bool> for Robj where
    Self: 'a, 
[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 From<i32> for Bool[src]

impl IsNA for Bool[src]

impl PartialEq<Bool> for Bool[src]

impl StructuralEq for Bool[src]

impl StructuralPartialEq for Bool[src]

impl ToVectorValue for Bool[src]

impl ToVectorValue for &Bool[src]

Auto Trait Implementations

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.