Struct strict_encoding::Primitive
source · pub struct Primitive(_);
Implementations§
source§impl Primitive
impl Primitive
pub const fn unsigned(bytes: u16) -> Self
pub const fn signed(bytes: u16) -> Self
pub const fn non_zero(bytes: u16) -> Self
pub const fn float(bytes: u16) -> Self
pub const fn from_code(code: u8) -> Self
pub const fn into_code(self) -> u8
pub const fn info(self) -> NumInfo
pub const fn byte_size(self) -> u16
Trait Implementations§
source§impl<'de> Deserialize<'de> for Primitive
impl<'de> Deserialize<'de> for Primitive
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 Ord for Primitive
impl Ord for Primitive
source§impl PartialEq<Primitive> for Primitive
impl PartialEq<Primitive> for Primitive
source§impl PartialOrd<Primitive> for Primitive
impl PartialOrd<Primitive> for Primitive
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl StrictDecode for Primitive
impl StrictDecode for Primitive
fn strict_decode(reader: &mut impl TypedRead) -> Result<Self, DecodeError>
source§impl StrictDumb for Primitive
impl StrictDumb for Primitive
fn strict_dumb() -> Self
source§impl StrictEncode for Primitive
impl StrictEncode for Primitive
fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>
source§impl StrictTuple for Primitive
impl StrictTuple for Primitive
const FIELD_COUNT: u8 = 1u8
fn strict_check_fields()
fn strict_type_info() -> TypeInfo<Self>
source§impl StrictType for Primitive
impl StrictType for Primitive
const STRICT_LIB_NAME: &'static str = STRICT_TYPES_LIB
fn strict_name() -> Option<TypeName>
source§impl Wrapper for Primitive
impl Wrapper for Primitive
source§fn from_inner(inner: Self::Inner) -> Self
fn from_inner(inner: Self::Inner) -> Self
Instantiates wrapper type with the inner data
source§fn as_inner(&self) -> &Self::Inner
fn as_inner(&self) -> &Self::Inner
Returns reference to the inner representation for the wrapper type
source§fn into_inner(self) -> Self::Inner
fn into_inner(self) -> Self::Inner
Unwraps the wrapper returning the inner type
impl Copy for Primitive
impl Eq for Primitive
impl StrictProduct for Primitive
impl StructuralEq for Primitive
impl StructuralPartialEq for Primitive
Auto Trait Implementations§
impl RefUnwindSafe for Primitive
impl Send for Primitive
impl Sync for Primitive
impl Unpin for Primitive
impl UnwindSafe for Primitive
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.