Struct Boolean

Source
pub struct Boolean(/* private fields */);
Expand description

A boolean value.

Trait Implementations§

Source§

impl Add for Boolean

Source§

type Output = Boolean

The resulting type after applying the + operator.
Source§

fn add(self, other: Boolean) -> <Boolean as Add>::Output

Performs the + operation. Read more
Source§

impl AddAssign for Boolean

Source§

fn add_assign(&mut self, other: Boolean)

Performs the += operation. Read more
Source§

impl CastFrom<Complex> for Boolean

Source§

fn cast_from(c: Complex) -> Boolean

Cast an instance of T into an instance of Self.
Source§

impl CastFrom<Float> for Boolean

Source§

fn cast_from(f: Float) -> Boolean

Cast an instance of T into an instance of Self.
Source§

impl CastFrom<Int> for Boolean

Source§

fn cast_from(i: Int) -> Boolean

Cast an instance of T into an instance of Self.
Source§

impl CastFrom<Number> for Boolean

Source§

fn cast_from(number: Number) -> Boolean

Cast an instance of T into an instance of Self.
Source§

impl Clone for Boolean

Source§

fn clone(&self) -> Boolean

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Boolean

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for Boolean

Source§

fn default() -> Boolean

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Boolean

Source§

fn deserialize<D>( deserializer: D, ) -> Result<Boolean, <D as Deserializer<'de>>::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for Boolean

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Div for Boolean

Source§

type Output = Boolean

The resulting type after applying the / operator.
Source§

fn div(self, other: Boolean) -> <Boolean as Div>::Output

Performs the / operation. Read more
Source§

impl DivAssign for Boolean

Source§

fn div_assign(&mut self, other: Boolean)

Performs the /= operation. Read more
Source§

impl From<Boolean> for Complex

Source§

fn from(b: Boolean) -> Complex

Converts to this type from the input type.
Source§

impl From<Boolean> for Float

Source§

fn from(b: Boolean) -> Float

Converts to this type from the input type.
Source§

impl From<Boolean> for Int

Source§

fn from(b: Boolean) -> Int

Converts to this type from the input type.
Source§

impl From<Boolean> for Number

Source§

fn from(b: Boolean) -> Number

Converts to this type from the input type.
Source§

impl From<Boolean> for UInt

Source§

fn from(b: Boolean) -> UInt

Converts to this type from the input type.
Source§

impl From<bool> for Boolean

Source§

fn from(b: bool) -> Boolean

Converts to this type from the input type.
Source§

impl FromStr for Boolean

Source§

type Err = Error

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Boolean, <Boolean as FromStr>::Err>

Parses a string s to return a value of this type. Read more
Source§

impl FromStream for Boolean

Source§

type Context = ()

The decoding context of this type, useful in situations where the stream to be decoded may be too large to hold in main memory. Read more
Source§

fn from_stream<'life0, 'async_trait, D>( cxt: <Boolean as FromStream>::Context, decoder: &'life0 mut D, ) -> Pin<Box<dyn Future<Output = Result<Boolean, <D as Decoder>::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, D: 'async_trait + Decoder, Boolean: 'async_trait,

Parse this value using the given Decoder.
Source§

impl GetSize for Boolean

Source§

fn get_size(&self) -> usize

Determines the total size of the object. Read more
Source§

fn get_stack_size() -> usize

Determines how may bytes this object occupies inside the stack. Read more
Source§

fn get_heap_size(&self) -> usize

Determines how many bytes this object occupies inside the heap. Read more
Source§

impl<D> Hash<D> for Boolean
where D: Digest,

Source§

fn hash(self) -> GenericArray<u8, <D as OutputSizeUser>::OutputSize>

Compute the SHA-2 hash of this value
Source§

impl Hash for Boolean

Source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

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

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<'en> IntoStream<'en> for Boolean

Source§

fn into_stream<E>( self, e: E, ) -> Result<<E as Encoder<'en>>::Ok, <E as Encoder<'en>>::Error>
where E: Encoder<'en>,

Take ownership of this value and serialize it into the given encoder.
Source§

impl Mul for Boolean

Source§

type Output = Boolean

The resulting type after applying the * operator.
Source§

fn mul(self, other: Boolean) -> Boolean

Performs the * operation. Read more
Source§

impl MulAssign for Boolean

Source§

fn mul_assign(&mut self, other: Boolean)

Performs the *= operation. Read more
Source§

impl NumberInstance for Boolean

Source§

type Abs = Boolean

Source§

type Exp = Float

Source§

type Log = Float

Source§

type Round = Boolean

Source§

type Class = BooleanType

Source§

fn class(&self) -> BooleanType

Get an impl of NumberClass describing this number.
Source§

fn into_type(self, _dtype: BooleanType) -> Boolean

Cast this number into the specified NumberClass.
Source§

fn abs(self) -> Boolean

Calculate the absolute value of this number.
Source§

fn exp(self) -> <Boolean as NumberInstance>::Exp

Raise e to the power of this number.
Source§

fn ln(self) -> <Boolean as NumberInstance>::Log

Compute the natural logarithm of this number.
Source§

fn log<N>(self, base: N) -> <Boolean as NumberInstance>::Log
where N: NumberInstance, Float: From<N>,

Compute the logarithm of this number with respect to the given base.
Source§

fn pow(self, exp: Number) -> Boolean

Raise this number to the given exponent. Read more
Source§

fn and(self, other: Boolean) -> Boolean

Return true if self and other are nonzero.
Source§

fn not(self) -> Boolean

Return true if this number is zero.
Source§

fn or(self, other: Boolean) -> Boolean

Return true if self or other is nonzero.
Source§

fn round(self) -> <Boolean as NumberInstance>::Round

Return this number rounded to the nearest integer.
Source§

fn xor(self, other: Boolean) -> Boolean

Return true if exactly one of self and other is zero.
Source§

impl Ord for Boolean

Source§

fn cmp(&self, other: &Boolean) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for Boolean

Source§

fn eq(&self, other: &Boolean) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for Boolean

Source§

fn partial_cmp(&self, other: &Boolean) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Product for Boolean

Source§

fn product<I>(iter: I) -> Boolean
where I: Iterator<Item = Boolean>,

Takes an iterator and generates Self from the elements by multiplying the items.
Source§

impl RealInstance for Boolean

Source§

const ONE: Boolean

Source§

const ZERO: Boolean

Source§

fn is_positive(&self) -> bool

Return true if this is zero or a positive number.
Source§

fn is_negative(&self) -> bool

Return true if this is a negative number.
Source§

fn is_zero(&self) -> bool

Return true if this is zero.
Source§

impl Rem for Boolean

Source§

type Output = Boolean

The resulting type after applying the % operator.
Source§

fn rem(self, other: Boolean) -> <Boolean as Rem>::Output

Performs the % operation. Read more
Source§

impl RemAssign for Boolean

Source§

fn rem_assign(&mut self, other: Boolean)

Performs the %= operation. Read more
Source§

impl Serialize for Boolean

Source§

fn serialize<S>( &self, s: S, ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Sub for Boolean

Source§

type Output = Boolean

The resulting type after applying the - operator.
Source§

fn sub(self, other: Boolean) -> <Boolean as Sub>::Output

Performs the - operation. Read more
Source§

impl SubAssign for Boolean

Source§

fn sub_assign(&mut self, other: Boolean)

Performs the -= operation. Read more
Source§

impl Sum for Boolean

Source§

fn sum<I>(iter: I) -> Boolean
where I: Iterator<Item = Boolean>,

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

impl<'en> ToStream<'en> for Boolean

Source§

fn to_stream<E>( &'en self, e: E, ) -> Result<<E as Encoder<'en>>::Ok, <E as Encoder<'en>>::Error>
where E: Encoder<'en>,

Serialize this value into the given encoder.
Source§

impl Trigonometry for Boolean

Source§

type Out = Float

Source§

fn asin(self) -> <Boolean as Trigonometry>::Out

Arcsine
Source§

fn sin(self) -> <Boolean as Trigonometry>::Out

Sine
Source§

fn sinh(self) -> <Boolean as Trigonometry>::Out

Hyperbolic sine
Source§

fn asinh(self) -> <Boolean as Trigonometry>::Out

Hyperbolic arcsine
Source§

fn acos(self) -> <Boolean as Trigonometry>::Out

Hyperbolic arccosine
Source§

fn cos(self) -> <Boolean as Trigonometry>::Out

Cosine
Source§

fn cosh(self) -> <Boolean as Trigonometry>::Out

Hyperbolic cosine
Source§

fn acosh(self) -> <Boolean as Trigonometry>::Out

Hyperbolic arccosine
Source§

fn atan(self) -> <Boolean as Trigonometry>::Out

Arctangent
Source§

fn tan(self) -> <Boolean as Trigonometry>::Out

Tangent
Source§

fn tanh(self) -> <Boolean as Trigonometry>::Out

Hyperbolic tangent
Source§

fn atanh(self) -> <Boolean as Trigonometry>::Out

Hyperbolic arctangent
Source§

impl Copy for Boolean

Source§

impl Eq for Boolean

Source§

impl StructuralPartialEq for Boolean

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<F, T> CastFrom<F> for T
where T: From<F>,

Source§

fn cast_from(f: F) -> T

Cast an instance of T into an instance of Self.
Source§

impl<T, F> CastInto<F> for T
where F: CastFrom<T>,

Source§

fn cast_into(self) -> F

Cast an instance of Self into an instance of T.
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<F> Match for F

Source§

fn matches<T>(&self) -> bool
where T: TryCastFrom<Self>,

Returns true if self can be cast into the target type T.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<F, T> TryCastFrom<F> for T
where T: CastFrom<F>,

Source§

fn can_cast_from(_: &F) -> bool

Test if value can be cast into Self.
Source§

fn opt_cast_from(f: F) -> Option<T>

Returns Some(Self) if the source value can be cast into Self, otherwise None.
Source§

fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err>
where OnErr: FnOnce(&T) -> Err,

Returns Ok(Self) if the source value can be cast into Self, otherwise calls on_err.
Source§

impl<F, T> TryCastInto<T> for F
where T: TryCastFrom<F>,

Source§

fn can_cast_into(&self) -> bool

Test if self can be cast into T.
Source§

fn opt_cast_into(self) -> Option<T>

Returns Some(T) if self can be cast into T, otherwise None.
Source§

fn try_cast_into<Err, OnErr>(self, on_err: OnErr) -> Result<T, Err>
where OnErr: FnOnce(&Self) -> Err,

Returns Ok(T) if self can be cast into T, otherwise calls on_err.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T, Rhs> NumAssignOps<Rhs> for T
where T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>,

Source§

impl<T, Rhs, Output> NumOps<Rhs, Output> for T
where T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,

Source§

impl<T> RuleType for T
where T: Copy + Debug + Eq + Hash + Ord,

Source§

impl<T> ThreadSafe for T
where T: Send + Sync + 'static,