[−][src]Struct exonum::encoding::CheckedOffset
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]
impl CheckedOffset
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 From<u32> for CheckedOffset
impl Eq for CheckedOffset
[src]
impl Eq for CheckedOffset
impl PartialOrd<CheckedOffset> for CheckedOffset
[src]
impl PartialOrd<CheckedOffset> for CheckedOffset
fn partial_cmp(&self, other: &CheckedOffset) -> Option<Ordering> | [src] |
fn lt(&self, other: &CheckedOffset) -> bool | [src] |
fn le(&self, other: &CheckedOffset) -> bool | [src] |
fn gt(&self, other: &CheckedOffset) -> bool | [src] |
fn ge(&self, other: &CheckedOffset) -> bool | [src] |
impl Copy for CheckedOffset
[src]
impl Copy for CheckedOffset
impl PartialEq<CheckedOffset> for CheckedOffset
[src]
impl PartialEq<CheckedOffset> for CheckedOffset
fn eq(&self, other: &CheckedOffset) -> bool | [src] |
fn ne(&self, other: &CheckedOffset) -> bool | [src] |
impl Clone for CheckedOffset
[src]
impl Clone for CheckedOffset
fn clone(&self) -> 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]
impl Ord for CheckedOffset
fn cmp(&self, other: &CheckedOffset) -> Ordering | [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 Debug for CheckedOffset
impl Add<CheckedOffset> for CheckedOffset
[src]
impl Add<CheckedOffset> for CheckedOffset
type Output = Result<CheckedOffset, Error>
The resulting type after applying the +
operator.
fn add(self, rhs: CheckedOffset) -> Self::Output | [src] |
impl Add<u32> for CheckedOffset
[src]
impl Add<u32> for CheckedOffset
type Output = Result<CheckedOffset, Error>
The resulting type after applying the +
operator.
fn add(self, rhs: Offset) -> Self::Output | [src] |
impl Sub<CheckedOffset> for CheckedOffset
[src]
impl Sub<CheckedOffset> for CheckedOffset
type Output = Result<CheckedOffset, Error>
The resulting type after applying the -
operator.
fn sub(self, rhs: CheckedOffset) -> Self::Output | [src] |
impl Sub<u32> for CheckedOffset
[src]
impl Sub<u32> for CheckedOffset
type Output = Result<CheckedOffset, Error>
The resulting type after applying the -
operator.
fn sub(self, rhs: Offset) -> Self::Output | [src] |
impl Mul<CheckedOffset> for CheckedOffset
[src]
impl Mul<CheckedOffset> for CheckedOffset
type Output = Result<CheckedOffset, Error>
The resulting type after applying the *
operator.
fn mul(self, rhs: CheckedOffset) -> Self::Output | [src] |
impl Mul<u32> for CheckedOffset
[src]
impl Mul<u32> for CheckedOffset
type Output = Result<CheckedOffset, Error>
The resulting type after applying the *
operator.
fn mul(self, rhs: Offset) -> Self::Output | [src] |
impl Div<CheckedOffset> for CheckedOffset
[src]
impl Div<CheckedOffset> for CheckedOffset
type Output = Result<CheckedOffset, Error>
The resulting type after applying the /
operator.
fn div(self, rhs: CheckedOffset) -> Self::Output | [src] |
impl Div<u32> for CheckedOffset
[src]
impl Div<u32> for CheckedOffset
Auto Trait Implementations
impl Send for CheckedOffset
impl Send for CheckedOffset
impl Sync for CheckedOffset
impl Sync for CheckedOffset
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)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> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T | [src] |
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error> | [src] |
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId | [src] |
impl<T> Erased for T
impl<T> Erased for T
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<Q, K> Equivalent for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool | [src] |
impl<T> Same for T
impl<T> Same for T
type Output = T
Should always be Self