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 StrictDecode for Sizing
impl StrictDecode for Sizing
fn strict_decode(reader: &mut impl TypedRead) -> Result<Self, DecodeError>
fn strict_read(reader: impl ReadRaw) -> 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>
fn strict_write(&self, writer: impl WriteRaw) -> Result<()>
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 StructuralPartialEq for Sizing
Auto Trait Implementations§
impl Freeze for Sizing
impl RefUnwindSafe for Sizing
impl Send for Sizing
impl Sync for Sizing
impl Unpin for Sizing
impl UnwindSafe for Sizing
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more