pub struct ComputeKey<N>where
N: Network,{ /* private fields */ }Implementations§
Source§impl<N> ComputeKey<N>where
N: Network,
impl<N> ComputeKey<N>where
N: Network,
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 for ComputeKey<N>
impl<N> Clone for ComputeKey<N>
Source§fn clone(&self) -> ComputeKey<N>
fn clone(&self) -> ComputeKey<N>
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<N> Debug for ComputeKey<N>
impl<N> Debug for ComputeKey<N>
Source§impl<'de, N> Deserialize<'de> for ComputeKey<N>where
N: Network,
impl<'de, N> Deserialize<'de> for ComputeKey<N>where
N: Network,
Source§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.
Source§impl<N> Equal for ComputeKey<N>where
N: Network,
impl<N> Equal for ComputeKey<N>where
N: Network,
Source§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.
Source§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>
Source§impl<N> FromBits for ComputeKey<N>where
N: Network,
impl<N> FromBits for ComputeKey<N>where
N: Network,
Source§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.
Source§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.
Source§impl<N> FromBytes for ComputeKey<N>where
N: Network,
impl<N> FromBytes for ComputeKey<N>where
N: Network,
Source§impl<N> Hash for ComputeKey<N>
impl<N> Hash for ComputeKey<N>
Source§impl<N> PartialEq for ComputeKey<N>
impl<N> PartialEq for ComputeKey<N>
Source§impl<N> Serialize for ComputeKey<N>where
N: Network,
impl<N> Serialize for ComputeKey<N>where
N: Network,
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,
Serializes an account compute key into bytes.
Source§impl<N> SizeInBits for ComputeKey<N>where
N: Network,
impl<N> SizeInBits for ComputeKey<N>where
N: Network,
Source§fn size_in_bits() -> usize
fn size_in_bits() -> usize
Returns the compute key size in bits.
Source§impl<N> SizeInBytes for ComputeKey<N>where
N: Network,
impl<N> SizeInBytes for ComputeKey<N>where
N: Network,
Source§fn size_in_bytes() -> usize
fn size_in_bytes() -> usize
Returns the compute key size in bytes.
Source§impl<N> Ternary for ComputeKey<N>where
N: Network,
impl<N> Ternary for ComputeKey<N>where
N: Network,
Source§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>
Source§impl<N> ToBits for ComputeKey<N>where
N: Network,
impl<N> ToBits for ComputeKey<N>where
N: Network,
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.
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.Source§impl<N> ToBytes for ComputeKey<N>where
N: Network,
impl<N> ToBytes for ComputeKey<N>where
N: Network,
Source§impl<N> ToFields for ComputeKey<N>where
N: Network,
impl<N> ToFields for ComputeKey<N>where
N: Network,
Source§impl<N> TryFrom<&PrivateKey<N>> for ComputeKey<N>where
N: Network,
impl<N> TryFrom<&PrivateKey<N>> for ComputeKey<N>where
N: Network,
Source§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.
Source§impl<N> TryFrom<PrivateKey<N>> for ComputeKey<N>where
N: Network,
impl<N> TryFrom<PrivateKey<N>> for ComputeKey<N>where
N: Network,
Source§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> StructuralPartialEq for ComputeKey<N>where
N: Network,
Auto Trait Implementations§
impl<N> Freeze for ComputeKey<N>
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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§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.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more