pub enum TypeConstr<T>{
Plain(T),
Array(u16, T),
List(T),
Set(T),
Map(KeyType, T),
}
Variants§
Implementations§
Trait Implementations§
Source§impl<T> Clone for TypeConstr<T>
impl<T> Clone for TypeConstr<T>
Source§fn clone(&self) -> TypeConstr<T>
fn clone(&self) -> TypeConstr<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<T> Debug for TypeConstr<T>
impl<T> Debug for TypeConstr<T>
Source§impl<T> Display for TypeConstr<T>
impl<T> Display for TypeConstr<T>
Source§impl<T> From<T> for TypeConstr<T>
impl<T> From<T> for TypeConstr<T>
Source§impl From<TypeConstr<AsciiString<1, 32>>> for TypeRef
impl From<TypeConstr<AsciiString<1, 32>>> for TypeRef
Source§fn from(v: TypeConstr<TypeName>) -> Self
fn from(v: TypeConstr<TypeName>) -> Self
Converts to this type from the input type.
Source§impl From<TypeConstr<PrimitiveType>> for TypeRef
impl From<TypeConstr<PrimitiveType>> for TypeRef
Source§fn from(v: TypeConstr<PrimitiveType>) -> Self
fn from(v: TypeConstr<PrimitiveType>) -> Self
Converts to this type from the input type.
Source§impl<T> Hash for TypeConstr<T>
impl<T> Hash for TypeConstr<T>
Source§impl<T> Ord for TypeConstr<T>
impl<T> Ord for TypeConstr<T>
Source§fn cmp(&self, other: &TypeConstr<T>) -> Ordering
fn cmp(&self, other: &TypeConstr<T>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<T> PartialEq for TypeConstr<T>
impl<T> PartialEq for TypeConstr<T>
Source§impl<T> PartialOrd for TypeConstr<T>
impl<T> PartialOrd for TypeConstr<T>
Source§impl<T> StrictDecode for TypeConstr<T>
impl<T> StrictDecode for TypeConstr<T>
Source§fn strict_decode<D: Read>(d: D) -> Result<Self, Error>
fn strict_decode<D: Read>(d: D) -> Result<Self, Error>
Decode with the given
std::io::Read
instance; must either
construct an instance or return implementation-specific error type.Source§fn strict_deserialize(data: impl AsRef<[u8]>) -> Result<Self, Error>
fn strict_deserialize(data: impl AsRef<[u8]>) -> Result<Self, Error>
Tries to deserialize byte array into the current type using
StrictDecode::strict_decode
. If there are some data remains in the
buffer once deserialization is completed, fails with
Error::DataNotEntirelyConsumed
. Use io::Cursor
over the buffer and
StrictDecode::strict_decode
to avoid such failures.Source§fn strict_file_load(path: impl AsRef<Path>) -> Result<Self, Error>
fn strict_file_load(path: impl AsRef<Path>) -> Result<Self, Error>
Reads data from file at
path
and reconstructs object from it. Fails
with Error::DataNotEntirelyConsumed
if file contains remaining
data after the object reconstruction.Source§impl<T> StrictEncode for TypeConstr<T>
impl<T> StrictEncode for TypeConstr<T>
Source§fn strict_encode<E: Write>(&self, e: E) -> Result<usize, Error>
fn strict_encode<E: Write>(&self, e: E) -> Result<usize, Error>
Encode with the given
std::io::Write
instance; must return result
with either amount of bytes encoded – or implementation-specific
error type.Source§fn strict_serialize(&self) -> Result<Vec<u8>, Error>
fn strict_serialize(&self) -> Result<Vec<u8>, Error>
Serializes data as a byte array using
StrictEncode::strict_encode
functionSource§impl<T> Verify for TypeConstr<T>
impl<T> Verify for TypeConstr<T>
impl<T> Eq for TypeConstr<T>
impl<T> StructuralPartialEq for TypeConstr<T>
Auto Trait Implementations§
impl<T> Freeze for TypeConstr<T>where
T: Freeze,
impl<T> RefUnwindSafe for TypeConstr<T>where
T: RefUnwindSafe,
impl<T> Send for TypeConstr<T>where
T: Send,
impl<T> Sync for TypeConstr<T>where
T: Sync,
impl<T> Unpin for TypeConstr<T>where
T: Unpin,
impl<T> UnwindSafe for TypeConstr<T>where
T: UnwindSafe,
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