#[repr(u8)]pub enum Consensus {
None = 0,
Bitcoin = 16,
Liquid = 17,
Prime = 32,
}
Expand description
Consensus (layer 1) which is used by a contract.
Variants§
None = 0
No consensus is used.
This means the contract data are not final and depend on the external consensus between the contract parties.
Bitcoin = 16
Bitcoin PoW consensus.
Liquid = 17
Liquid federation consensus.
Prime = 32
Prime consensus.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Consensus
impl<'de> Deserialize<'de> for Consensus
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Consensus, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Consensus, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for Consensus
impl Ord for Consensus
Source§impl PartialOrd for Consensus
impl PartialOrd for Consensus
Source§impl Serialize for Consensus
impl Serialize for Consensus
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl StrictDecode for Consensus
impl StrictDecode for Consensus
fn strict_decode(reader: &mut impl TypedRead) -> Result<Consensus, DecodeError>
fn strict_read(reader: impl ReadRaw) -> Result<Self, DecodeError>
Source§impl StrictDumb for Consensus
impl StrictDumb for Consensus
fn strict_dumb() -> Consensus
Source§impl StrictEncode for Consensus
impl StrictEncode for Consensus
fn strict_encode<W>(&self, writer: W) -> Result<W, Error>where
W: TypedWrite,
fn strict_write(&self, writer: impl WriteRaw) -> Result<(), Error>
Source§impl StrictEnum for Consensus
impl StrictEnum for Consensus
fn from_variant_name( name: &VariantName, ) -> Result<Self, VariantError<&VariantName>>
fn strict_type_info() -> TypeInfo<Self>
Source§impl StrictSum for Consensus
impl StrictSum for Consensus
const ALL_VARIANTS: &'static [(u8, &'static str)]
fn variant_name(&self) -> &'static str
fn strict_check_variants()
fn variant_name_by_tag(tag: u8) -> Option<VariantName>
fn variant_ord(&self) -> u8
Source§impl StrictType for Consensus
impl StrictType for Consensus
const STRICT_LIB_NAME: &'static str = LIB_NAME_ULTRASONIC
fn strict_name() -> Option<TypeName>
impl Copy for Consensus
impl Eq for Consensus
impl StructuralPartialEq for Consensus
Auto Trait Implementations§
impl Freeze for Consensus
impl RefUnwindSafe for Consensus
impl Send for Consensus
impl Sync for Consensus
impl Unpin for Consensus
impl UnwindSafe for Consensus
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.