pub trait BVSize: Sized {
// Required methods
fn from_usize(val: usize) -> Self;
fn as_usize(&self) -> usize;
fn max_value() -> Self;
fn checked_add(self, rhs: Self) -> Option<Self>;
fn get_size_of() -> Self;
}
Expand description
Represents the generic integral type of the structure size indicators
Required Methods§
Sourcefn from_usize(val: usize) -> Self
fn from_usize(val: usize) -> Self
Returns a Self
value casted from an usize
value
Sourcefn checked_add(self, rhs: Self) -> Option<Self>
fn checked_add(self, rhs: Self) -> Option<Self>
Calls the checked_add
method of self
passing rhs
Sourcefn get_size_of() -> Self
fn get_size_of() -> Self
Returns the returned value of [std::mem::size_of
][1] for Self
[1]: http://doc.rust-lang.org/stable/std/mem/fn.size_of.html
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.