[][src]Enum rosy::num::pack::Sign

pub enum Sign {
    Zero,
    Positive {
        did_overflow: bool,
    },
    Negative {
        did_overflow: bool,
    },
}

The sign of an Integer value returned after packing one into a buffer.

Variants

Zero

Packing resulted in a value equal to 0.

Positive

Packing resulted in a positive value.

Fields of Positive

did_overflow: bool

An overflow occurred when packing an Integer into a buffer.

Negative

Packing resulted in a negative value.

Fields of Negative

did_overflow: bool

An overflow occurred when packing an Integer into a buffer.

Methods

impl Sign[src]

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

Returns whether an overflow occurred when packing an Integer into a buffer.

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

Returns whether the sign is negative.

Trait Implementations

impl Eq for Sign[src]

impl PartialEq<Sign> for Sign[src]

impl Copy for Sign[src]

impl Clone for Sign[src]

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

Performs copy-assignment from source. Read more

impl Debug for Sign[src]

Auto Trait Implementations

impl Send for Sign

impl Sync for Sign

Blanket Implementations

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> From<T> for 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> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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