pub struct RevealedValue {
pub value: FungibleState,
pub blinding: BlindingFactor,
}
Expand description
State item for a homomorphically-encryptable state.
Consists of the 64-bit value and
Fields§
§value: FungibleState
Original value in smallest indivisible units
blinding: BlindingFactor
Blinding factor used in Pedersen commitment
Implementations§
Source§impl RevealedValue
impl RevealedValue
Sourcepub fn new<R>(value: impl Into<FungibleState>, rng: &mut R) -> RevealedValue
pub fn new<R>(value: impl Into<FungibleState>, rng: &mut R) -> RevealedValue
Constructs new state using the provided value and random generator for creating blinding factor.
Sourcepub fn with(
value: impl Into<FungibleState>,
blinding: impl Into<BlindingFactor>,
) -> RevealedValue
pub fn with( value: impl Into<FungibleState>, blinding: impl Into<BlindingFactor>, ) -> RevealedValue
Convenience constructor.
Trait Implementations§
Source§impl Clone for RevealedValue
impl Clone for RevealedValue
Source§fn clone(&self) -> RevealedValue
fn clone(&self) -> RevealedValue
Returns a copy 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 CommitEncode for RevealedValue
impl CommitEncode for RevealedValue
Source§fn commit_encode(&self, e: &mut impl Write)
fn commit_encode(&self, e: &mut impl Write)
Encodes the data for the commitment by writing them directly into a
io::Write
writer instanceSource§impl CommitVerify<RevealedValue, PedersenProtocol> for ConcealedValue
impl CommitVerify<RevealedValue, PedersenProtocol> for ConcealedValue
Source§fn commit(revealed: &RevealedValue) -> ConcealedValue
fn commit(revealed: &RevealedValue) -> ConcealedValue
Creates a commitment to a byte representation of a given message
Source§impl CommitVerify<RevealedValue, UntaggedProtocol> for PedersenCommitment
impl CommitVerify<RevealedValue, UntaggedProtocol> for PedersenCommitment
Source§fn commit(revealed: &RevealedValue) -> PedersenCommitment
fn commit(revealed: &RevealedValue) -> PedersenCommitment
Creates a commitment to a byte representation of a given message
Source§impl Conceal for RevealedValue
impl Conceal for RevealedValue
Source§type Concealed = ConcealedValue
type Concealed = ConcealedValue
The resulting confidential type concealing original data.
Source§impl Debug for RevealedValue
impl Debug for RevealedValue
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 ExposedState for RevealedValue
impl ExposedState for RevealedValue
type Confidential = ConcealedValue
fn state_type(&self) -> StateType
fn state_data(&self) -> StateData
Source§impl From<RevealedValue> for FungibleState
impl From<RevealedValue> for FungibleState
Source§fn from(revealed: RevealedValue) -> FungibleState
fn from(revealed: RevealedValue) -> FungibleState
Converts to this type from the input type.
Source§impl Hash for RevealedValue
impl Hash for RevealedValue
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(lim: usize, reader: impl Read) -> 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, lim: usize, writer: impl Write) -> Result<usize, Error>
Source§impl StrictStruct for RevealedValue
impl StrictStruct for RevealedValue
const ALL_FIELDS: &'static [&'static str]
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
fn strict_name() -> Option<TypeName>
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 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.