pub struct RevealedValue(/* private fields */);Expand description
State item for a homomorphically-encryptable state.
Consists of the 64-bit value and
Implementations§
Source§impl RevealedValue
impl RevealedValue
Sourcepub fn new(value: impl Into<FungibleState>) -> RevealedValue
pub fn new(value: impl Into<FungibleState>) -> RevealedValue
Convenience constructor.
Methods from Deref<Target = FungibleState>§
pub fn fungible_type(&self) -> FungibleType
pub fn as_u64(&self) -> u64
Trait Implementations§
Source§impl AsRef<FungibleState> for RevealedValue
impl AsRef<FungibleState> for RevealedValue
Source§fn as_ref(&self) -> &FungibleState
fn as_ref(&self) -> &FungibleState
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Borrow<FungibleState> for RevealedValue
impl Borrow<FungibleState> for RevealedValue
Source§fn borrow(&self) -> &FungibleState
fn borrow(&self) -> &FungibleState
Immutably borrows from an owned value. Read more
Source§impl Clone for RevealedValue
impl Clone for RevealedValue
Source§fn clone(&self) -> RevealedValue
fn clone(&self) -> RevealedValue
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 Debug for RevealedValue
impl Debug for RevealedValue
Source§impl Deref for RevealedValue
impl Deref for RevealedValue
Source§type Target = FungibleState
type Target = FungibleState
The resulting type after dereferencing.
Source§impl<'de> Deserialize<'de> for RevealedValue
impl<'de> Deserialize<'de> for RevealedValue
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RevealedValue, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<RevealedValue, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for RevealedValue
impl Display for RevealedValue
Source§impl ExposedState for RevealedValue
impl ExposedState for RevealedValue
fn state_type(&self) -> StateType
fn state_data(&self) -> RevealedState
Source§impl From<Amount> for RevealedValue
impl From<Amount> for RevealedValue
Source§fn from(amount: Amount) -> RevealedValue
fn from(amount: Amount) -> RevealedValue
Converts to this type from the input type.
Source§impl From<FungibleState> for RevealedValue
impl From<FungibleState> for RevealedValue
Source§fn from(v: FungibleState) -> RevealedValue
fn from(v: FungibleState) -> RevealedValue
Converts to this type from the input type.
Source§impl From<RevealedValue> for AllocatedState
impl From<RevealedValue> for AllocatedState
Source§fn from(v: RevealedValue) -> AllocatedState
fn from(v: RevealedValue) -> AllocatedState
Converts to this type from the input type.
Source§impl From<RevealedValue> for Amount
impl From<RevealedValue> for Amount
Source§fn from(value: RevealedValue) -> Amount
fn from(value: RevealedValue) -> Amount
Converts to this type from the input type.
Source§impl From<RevealedValue> for FungibleState
impl From<RevealedValue> for FungibleState
Source§fn from(wrapped: RevealedValue) -> FungibleState
fn from(wrapped: RevealedValue) -> FungibleState
Converts to this type from the input type.
Source§impl From<u64> for RevealedValue
impl From<u64> for RevealedValue
Source§fn from(value: u64) -> RevealedValue
fn from(value: u64) -> RevealedValue
Converts to this type from the input type.
Source§impl Hash for RevealedValue
impl Hash for RevealedValue
Source§impl KnownState for RevealedValue
impl KnownState for RevealedValue
const IS_FUNGIBLE: bool = true
Source§impl Ord for RevealedValue
impl Ord for RevealedValue
Source§fn cmp(&self, other: &RevealedValue) -> Ordering
fn cmp(&self, other: &RevealedValue) -> 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 PartialEq for RevealedValue
impl PartialEq for RevealedValue
Source§impl PartialOrd for RevealedValue
impl PartialOrd for RevealedValue
Source§impl Serialize for RevealedValue
impl Serialize for RevealedValue
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 RevealedValue
impl StrictDecode for RevealedValue
fn strict_decode( reader: &mut impl TypedRead, ) -> Result<RevealedValue, DecodeError>
fn strict_read(reader: impl ReadRaw) -> Result<Self, DecodeError>
Source§impl StrictDumb for RevealedValue
impl StrictDumb for RevealedValue
fn strict_dumb() -> RevealedValue
Source§impl StrictEncode for RevealedValue
impl StrictEncode for RevealedValue
fn strict_encode<W>(&self, writer: W) -> Result<W, Error>where
W: TypedWrite,
fn strict_write(&self, writer: impl WriteRaw) -> Result<(), Error>
Source§impl StrictTuple for RevealedValue
impl StrictTuple for RevealedValue
const FIELD_COUNT: u8
fn strict_check_fields()
fn strict_type_info() -> TypeInfo<Self>
Source§impl StrictType for RevealedValue
impl StrictType for RevealedValue
const STRICT_LIB_NAME: &'static str = LIB_NAME_RGB_COMMIT
fn strict_name() -> Option<TypeName>
Source§impl Wrapper for RevealedValue
impl Wrapper for RevealedValue
Source§type Inner = FungibleState
type Inner = FungibleState
Inner type wrapped by the current newtype
Source§fn from_inner(inner: <RevealedValue as Wrapper>::Inner) -> RevealedValue
fn from_inner(inner: <RevealedValue as Wrapper>::Inner) -> RevealedValue
Instantiates wrapper type with the inner data
Source§fn as_inner(&self) -> &<RevealedValue as Wrapper>::Inner
fn as_inner(&self) -> &<RevealedValue as Wrapper>::Inner
Returns reference to the inner representation for the wrapper type
Source§fn into_inner(self) -> <RevealedValue as Wrapper>::Inner
fn into_inner(self) -> <RevealedValue as Wrapper>::Inner
Unwraps the wrapper returning the inner type
impl Copy for RevealedValue
impl Eq for RevealedValue
impl StrictProduct for RevealedValue
impl StructuralPartialEq for RevealedValue
Auto Trait Implementations§
impl Freeze for RevealedValue
impl RefUnwindSafe for RevealedValue
impl Send for RevealedValue
impl Sync for RevealedValue
impl Unpin for RevealedValue
impl UnsafeUnpin for RevealedValue
impl UnwindSafe for RevealedValue
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.