[][src]Struct exonum::encoding::CheckedOffset

pub struct CheckedOffset { /* fields omitted */ }

CheckedOffset is a type that take control over overflow, so you can't panic without unwrap, and work with this value without overflow checks.

Methods

impl CheckedOffset
[src]

pub fn new(offset: Offset) -> Self
[src]

create checked value

pub fn unchecked_offset(self) -> Offset
[src]

return unchecked offset

Trait Implementations

impl From<u32> for CheckedOffset
[src]

impl Eq for CheckedOffset
[src]

impl PartialOrd<CheckedOffset> for CheckedOffset
[src]

impl Copy for CheckedOffset
[src]

impl PartialEq<CheckedOffset> for CheckedOffset
[src]

impl Clone for CheckedOffset
[src]

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

Performs copy-assignment from source. Read more

impl Ord for CheckedOffset
[src]

fn max(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the minimum of two values. Read more

impl Debug for CheckedOffset
[src]

impl Add<CheckedOffset> for CheckedOffset
[src]

type Output = Result<CheckedOffset, Error>

The resulting type after applying the + operator.

impl Add<u32> for CheckedOffset
[src]

type Output = Result<CheckedOffset, Error>

The resulting type after applying the + operator.

impl Sub<CheckedOffset> for CheckedOffset
[src]

type Output = Result<CheckedOffset, Error>

The resulting type after applying the - operator.

impl Sub<u32> for CheckedOffset
[src]

type Output = Result<CheckedOffset, Error>

The resulting type after applying the - operator.

impl Mul<CheckedOffset> for CheckedOffset
[src]

type Output = Result<CheckedOffset, Error>

The resulting type after applying the * operator.

impl Mul<u32> for CheckedOffset
[src]

type Output = Result<CheckedOffset, Error>

The resulting type after applying the * operator.

impl Div<CheckedOffset> for CheckedOffset
[src]

type Output = Result<CheckedOffset, Error>

The resulting type after applying the / operator.

impl Div<u32> for CheckedOffset
[src]

type Output = Result<CheckedOffset, Error>

The resulting type after applying the / operator.

Auto Trait Implementations

Blanket Implementations

impl<T> From for T
[src]

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

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

type Owned = T

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

impl<T> Erased for T

impl<T> Erased for T

impl<Q, K> Equivalent for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> Same for T

type Output = T

Should always be Self