Struct strict_encoding::Sizing
source · pub struct Sizing {
pub min: u64,
pub max: u64,
}
Fields§
§min: u64
§max: u64
Implementations§
source§impl Sizing
impl Sizing
pub const ONE: Sizing = _
pub const U8: Sizing = _
pub const U16: Sizing = _
pub const U8_NONEMPTY: Sizing = _
pub const U16_NONEMPTY: Sizing = _
pub const fn new(min: u64, max: u64) -> Self
pub const fn fixed(len: u64) -> Self
pub const fn is_fixed(&self) -> bool
pub const fn check(&self, len: usize) -> bool
Trait Implementations§
source§impl<'de> Deserialize<'de> for Sizing
impl<'de> Deserialize<'de> for Sizing
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq<Sizing> for Sizing
impl PartialEq<Sizing> for Sizing
source§impl StrictDecode for Sizing
impl StrictDecode for Sizing
fn strict_decode(reader: &mut impl TypedRead) -> Result<Self, DecodeError>
source§impl StrictDumb for Sizing
impl StrictDumb for Sizing
fn strict_dumb() -> Self
source§impl StrictEncode for Sizing
impl StrictEncode for Sizing
fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>
source§impl StrictStruct for Sizing
impl StrictStruct for Sizing
const ALL_FIELDS: &'static [&'static str] = _
fn strict_check_fields()
fn strict_type_info() -> TypeInfo<Self>
source§impl StrictType for Sizing
impl StrictType for Sizing
const STRICT_LIB_NAME: &'static str = STRICT_TYPES_LIB
fn strict_name() -> Option<TypeName>
impl Copy for Sizing
impl Eq for Sizing
impl StrictProduct for Sizing
impl StructuralEq for Sizing
impl StructuralPartialEq for Sizing
Auto Trait Implementations§
impl RefUnwindSafe for Sizing
impl Send for Sizing
impl Sync for Sizing
impl Unpin for Sizing
impl UnwindSafe for Sizing
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.