Struct snarkvm_console_account::compute_key::ComputeKey
source · pub struct ComputeKey<N: Network> { /* private fields */ }
Implementations§
source§impl<N: Network> ComputeKey<N>
impl<N: Network> ComputeKey<N>
sourcepub fn to_address(&self) -> Address<N>
pub fn to_address(&self) -> Address<N>
Returns the address corresponding to the compute key.
Trait Implementations§
source§impl<N: Clone + Network> Clone for ComputeKey<N>
impl<N: Clone + Network> Clone for ComputeKey<N>
source§fn clone(&self) -> ComputeKey<N>
fn clone(&self) -> ComputeKey<N>
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<'de, N: Network> Deserialize<'de> for ComputeKey<N>
impl<'de, N: Network> Deserialize<'de> for ComputeKey<N>
source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserializes an account compute key from bytes.
source§impl<N: Network> Equal for ComputeKey<N>
impl<N: Network> Equal for ComputeKey<N>
source§impl<N: Network> FromBits for ComputeKey<N>
impl<N: Network> FromBits for ComputeKey<N>
source§fn from_bits_le(bits_le: &[bool]) -> Result<Self>
fn from_bits_le(bits_le: &[bool]) -> Result<Self>
Initializes a new compute key from a list of little-endian bits.
source§fn from_bits_be(bits_be: &[bool]) -> Result<Self>
fn from_bits_be(bits_be: &[bool]) -> Result<Self>
Initializes a new compute key from a list of big-endian bits.
source§impl<N: Network> FromBytes for ComputeKey<N>
impl<N: Network> FromBytes for ComputeKey<N>
source§impl<N: PartialEq + Network> PartialEq for ComputeKey<N>
impl<N: PartialEq + Network> PartialEq for ComputeKey<N>
source§fn eq(&self, other: &ComputeKey<N>) -> bool
fn eq(&self, other: &ComputeKey<N>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<N: Network> Serialize for ComputeKey<N>
impl<N: Network> Serialize for ComputeKey<N>
source§impl<N: Network> SizeInBits for ComputeKey<N>
impl<N: Network> SizeInBits for ComputeKey<N>
source§fn size_in_bits() -> usize
fn size_in_bits() -> usize
Returns the compute key size in bits.
source§impl<N: Network> Ternary for ComputeKey<N>
impl<N: Network> Ternary for ComputeKey<N>
source§impl<N: Network> ToBits for ComputeKey<N>
impl<N: Network> ToBits for ComputeKey<N>
source§fn write_bits_le(&self, vec: &mut Vec<bool>)
fn write_bits_le(&self, vec: &mut Vec<bool>)
Returns the little-endian bits of the compute key.
source§fn write_bits_be(&self, vec: &mut Vec<bool>)
fn write_bits_be(&self, vec: &mut Vec<bool>)
Returns the big-endian bits of the compute key.
§fn to_bits_le(&self) -> Vec<bool>
fn to_bits_le(&self) -> Vec<bool>
Returns
self
as a boolean array in little-endian order.§fn to_bits_be(&self) -> Vec<bool>
fn to_bits_be(&self) -> Vec<bool>
Returns
self
as a boolean array in big-endian order.source§impl<N: Network> ToBytes for ComputeKey<N>
impl<N: Network> ToBytes for ComputeKey<N>
source§impl<N: Network> ToFields for ComputeKey<N>
impl<N: Network> ToFields for ComputeKey<N>
source§impl<N: Network> TryFrom<&PrivateKey<N>> for ComputeKey<N>
impl<N: Network> TryFrom<&PrivateKey<N>> for ComputeKey<N>
source§impl<N: Network> TryFrom<PrivateKey<N>> for ComputeKey<N>
impl<N: Network> TryFrom<PrivateKey<N>> for ComputeKey<N>
impl<N: Copy + Network> Copy for ComputeKey<N>
impl<N: Eq + Network> Eq for ComputeKey<N>
impl<N: Network> StructuralEq for ComputeKey<N>
impl<N: Network> StructuralPartialEq for ComputeKey<N>
Auto Trait Implementations§
impl<N> RefUnwindSafe for ComputeKey<N>where <N as Environment>::Projective: RefUnwindSafe, <N as Environment>::Scalar: RefUnwindSafe,
impl<N> Send for ComputeKey<N>
impl<N> Sync for ComputeKey<N>
impl<N> Unpin for ComputeKey<N>where <N as Environment>::Projective: Unpin, <N as Environment>::Scalar: Unpin,
impl<N> UnwindSafe for ComputeKey<N>where <N as Environment>::Projective: UnwindSafe, <N as Environment>::Scalar: 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
§impl<'de, T> DeserializeExt<'de> for Twhere
T: DeserializeOwned,
impl<'de, T> DeserializeExt<'de> for Twhere T: DeserializeOwned,
fn take_from_value<D>( value: &mut Value, field: &str ) -> Result<T, <D as Deserializer<'de>>::Error>where D: Deserializer<'de>,
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.