Struct snarkvm_debug::prelude::ComputeKey
pub struct ComputeKey<N>where
N: Network,{ /* private fields */ }Implementations§
§impl<N> ComputeKey<N>where
N: Network,
impl<N> ComputeKey<N>where
N: Network,
pub fn to_address(&self) -> Address<N>
pub fn to_address(&self) -> Address<N>
Returns the address corresponding to the compute key.
Trait Implementations§
§impl<N> Clone for ComputeKey<N>
impl<N> Clone for ComputeKey<N>
§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 more§impl<N> Debug for ComputeKey<N>
impl<N> Debug for ComputeKey<N>
§impl<'de, N> Deserialize<'de> for ComputeKey<N>where
N: Network,
impl<'de, N> Deserialize<'de> for ComputeKey<N>where
N: Network,
§fn deserialize<D>(
deserializer: D
) -> Result<ComputeKey<N>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D
) -> Result<ComputeKey<N>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserializes an account compute key from bytes.
§impl<N> Equal for ComputeKey<N>where
N: Network,
impl<N> Equal for ComputeKey<N>where
N: Network,
§fn is_equal(&self, other: &ComputeKey<N>) -> <ComputeKey<N> as Equal>::Output
fn is_equal(&self, other: &ComputeKey<N>) -> <ComputeKey<N> as Equal>::Output
Returns true if self and other are equal.
§fn is_not_equal(
&self,
other: &ComputeKey<N>
) -> <ComputeKey<N> as Equal>::Output
fn is_not_equal( &self, other: &ComputeKey<N> ) -> <ComputeKey<N> as Equal>::Output
Returns true if self and other are not equal.
type Output = Boolean<N>
§impl<N> FromBits for ComputeKey<N>where
N: Network,
impl<N> FromBits for ComputeKey<N>where
N: Network,
§fn from_bits_le(bits_le: &[bool]) -> Result<ComputeKey<N>, Error>
fn from_bits_le(bits_le: &[bool]) -> Result<ComputeKey<N>, Error>
Initializes a new compute key from a list of little-endian bits.
§fn from_bits_be(bits_be: &[bool]) -> Result<ComputeKey<N>, Error>
fn from_bits_be(bits_be: &[bool]) -> Result<ComputeKey<N>, Error>
Initializes a new compute key from a list of big-endian bits.
§impl<N> FromBytes for ComputeKey<N>where
N: Network,
impl<N> FromBytes for ComputeKey<N>where
N: Network,
§impl<N> Hash for ComputeKey<N>
impl<N> Hash for ComputeKey<N>
§impl<N> PartialEq for ComputeKey<N>
impl<N> PartialEq for ComputeKey<N>
§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 ==.§impl<N> Serialize for ComputeKey<N>where
N: Network,
impl<N> Serialize for ComputeKey<N>where
N: Network,
§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,
Serializes an account compute key into bytes.
§impl<N> SizeInBits for ComputeKey<N>where
N: Network,
impl<N> SizeInBits for ComputeKey<N>where
N: Network,
§fn size_in_bits() -> usize
fn size_in_bits() -> usize
Returns the compute key size in bits.
§impl<N> SizeInBytes for ComputeKey<N>where
N: Network,
impl<N> SizeInBytes for ComputeKey<N>where
N: Network,
§fn size_in_bytes() -> usize
fn size_in_bytes() -> usize
Returns the compute key size in bytes.
§impl<N> Ternary for ComputeKey<N>where
N: Network,
impl<N> Ternary for ComputeKey<N>where
N: Network,
§fn ternary(
condition: &<ComputeKey<N> as Ternary>::Boolean,
first: &ComputeKey<N>,
second: &ComputeKey<N>
) -> <ComputeKey<N> as Ternary>::Output
fn ternary( condition: &<ComputeKey<N> as Ternary>::Boolean, first: &ComputeKey<N>, second: &ComputeKey<N> ) -> <ComputeKey<N> as Ternary>::Output
Returns first if condition is true, otherwise returns second.
type Boolean = Boolean<N>
type Output = ComputeKey<N>
§impl<N> ToBits for ComputeKey<N>where
N: Network,
impl<N> ToBits for ComputeKey<N>where
N: Network,
§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.
§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.
source§fn to_bits_le(&self) -> Vec<bool>
fn to_bits_le(&self) -> Vec<bool>
Returns
self as a boolean array in little-endian order.source§fn to_bits_be(&self) -> Vec<bool>
fn to_bits_be(&self) -> Vec<bool>
Returns
self as a boolean array in big-endian order.§impl<N> ToBytes for ComputeKey<N>where
N: Network,
impl<N> ToBytes for ComputeKey<N>where
N: Network,
§impl<N> ToFields for ComputeKey<N>where
N: Network,
impl<N> ToFields for ComputeKey<N>where
N: Network,
§impl<N> TryFrom<&ComputeKey<N>> for Address<N>where
N: Network,
impl<N> TryFrom<&ComputeKey<N>> for Address<N>where
N: Network,
§impl<N> TryFrom<&PrivateKey<N>> for ComputeKey<N>where
N: Network,
impl<N> TryFrom<&PrivateKey<N>> for ComputeKey<N>where
N: Network,
§fn try_from(
private_key: &PrivateKey<N>
) -> Result<ComputeKey<N>, <ComputeKey<N> as TryFrom<&PrivateKey<N>>>::Error>
fn try_from( private_key: &PrivateKey<N> ) -> Result<ComputeKey<N>, <ComputeKey<N> as TryFrom<&PrivateKey<N>>>::Error>
Derives the account compute key from an account private key.
§impl<N> TryFrom<ComputeKey<N>> for Address<N>where
N: Network,
impl<N> TryFrom<ComputeKey<N>> for Address<N>where
N: Network,
§impl<N> TryFrom<PrivateKey<N>> for ComputeKey<N>where
N: Network,
impl<N> TryFrom<PrivateKey<N>> for ComputeKey<N>where
N: Network,
§fn try_from(
private_key: PrivateKey<N>
) -> Result<ComputeKey<N>, <ComputeKey<N> as TryFrom<PrivateKey<N>>>::Error>
fn try_from( private_key: PrivateKey<N> ) -> Result<ComputeKey<N>, <ComputeKey<N> as TryFrom<PrivateKey<N>>>::Error>
Derives the account compute key from an account private key.
impl<N> Copy for ComputeKey<N>
impl<N> Eq for ComputeKey<N>
impl<N> StructuralEq for ComputeKey<N>where
N: Network,
impl<N> StructuralPartialEq for ComputeKey<N>where
N: Network,
Auto Trait Implementations§
impl<N> RefUnwindSafe for ComputeKey<N>
impl<N> Send for ComputeKey<N>
impl<N> Sync for ComputeKey<N>
impl<N> Unpin for ComputeKey<N>
impl<N> UnwindSafe for ComputeKey<N>
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<'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>,
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.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§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 Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.