[−][src]Enum ergo_headless_dapp_framework::SType
Every type descriptor is a tree represented by nodes in SType hierarchy.
Variants
Type variable (generic)
TBD
Boolean
Signed byte
Signed short (16-bit)
Signed int (32-bit)
Signed long (64-bit)
256-bit integer
Discrete logarithm prime-order group element EcPoint
Proposition which can be proven and verified by sigma protocol.
ErgoBox value
AVL tree value
Optional value
Collection of elements of the same type
Tuple (elements can have different types)
Function (signature)
Context object ("CONTEXT" in ErgoScript)
Implementations
impl SType
[src]
pub fn type_code(&self) -> TypeCode
[src]
Type code used in serialization of SType values.
pub fn type_companion(&self) -> Option<Box<STypeCompanion, Global>>
[src]
Get STypeCompanion instance associated with this SType
pub fn new_scoll(elem_type: SType) -> SType
[src]
Create new SColl with the given element type
Trait Implementations
impl Clone for SType
[src]
impl Debug for SType
[src]
impl Eq for SType
[src]
impl PartialEq<SType> for SType
[src]
impl SigmaSerializable for SType
[src]
Each SType is serialized to array of bytes by:
- emitting typeCode of each node (see special case for collections below)
- then recursively serializing subtrees from left to right on each level
- for each collection of primitive type there is special type code to emit single byte instead of two bytes Types code intervals
- (1 .. MaxPrimTypeCode) // primitive types
- (CollectionTypeCode .. CollectionTypeCode + MaxPrimTypeCode) // collections of primitive types
- (MaxCollectionTypeCode ..) // Other types Collection of non-primitive type is serialized as (CollectionTypeCode, serialize(elementType))
pub fn sigma_serialize<W>(&self, w: &mut W) -> Result<(), Error> where
W: SigmaByteWrite,
[src]
W: SigmaByteWrite,
pub fn sigma_parse<R>(r: &mut R) -> Result<SType, SerializationError> where
R: SigmaByteRead,
[src]
R: SigmaByteRead,
pub fn sigma_serialize_bytes(&self) -> Vec<u8, Global>
[src]
pub fn sigma_parse_bytes(
bytes: Vec<u8, Global>
) -> Result<Self, SerializationError>
[src]
bytes: Vec<u8, Global>
) -> Result<Self, SerializationError>
impl StructuralEq for SType
[src]
impl StructuralPartialEq for SType
[src]
Auto Trait Implementations
impl RefUnwindSafe for SType
[src]
impl Send for SType
[src]
impl Sync for SType
[src]
impl Unpin for SType
[src]
impl UnwindSafe for SType
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
pub fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<F> TryExtractInto<F> for F
[src]
pub fn try_extract_into<T>(self) -> Result<T, TryExtractFromError> where
T: TryExtractFrom<F>,
[src]
T: TryExtractFrom<F>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,