Struct fadroma::scrt::vk::ViewingKeyHashed
source · pub struct ViewingKeyHashed(_);
Expand description
ViewingKey
as a SHA-256 hash.
PartialEq
is intentionally not implemented on this type in order to prevent
from using it to check viewing keys that way. Use ViewingKeyHashed::check
instead which performs a specialized constant time equality comparison.
Implementations§
Trait Implementations§
source§impl AsRef<[u8]> for ViewingKeyHashed
impl AsRef<[u8]> for ViewingKeyHashed
source§impl Canonize for ViewingKeyHashed
impl Canonize for ViewingKeyHashed
source§impl Clone for ViewingKeyHashed
impl Clone for ViewingKeyHashed
source§fn clone(&self) -> ViewingKeyHashed
fn clone(&self) -> ViewingKeyHashed
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 Debug for ViewingKeyHashed
impl Debug for ViewingKeyHashed
source§impl Default for ViewingKeyHashed
impl Default for ViewingKeyHashed
source§fn default() -> ViewingKeyHashed
fn default() -> ViewingKeyHashed
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for ViewingKeyHashed
impl<'de> Deserialize<'de> for ViewingKeyHashed
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl FadromaDeserialize for ViewingKeyHashed
impl FadromaDeserialize for ViewingKeyHashed
source§fn from_bytes<'a>(de: &mut Deserializer<'a>) -> Result<Self>
fn from_bytes<'a>(de: &mut Deserializer<'a>) -> Result<Self>
Deserialize into a new instance by reading bytes from
the provided
Deserializer
.source§impl FadromaSerialize for ViewingKeyHashed
impl FadromaSerialize for ViewingKeyHashed
source§fn size_hint(&self) -> usize
fn size_hint(&self) -> usize
The size in bytes of the particular instance when
converted to its byte respresentation. While it’s
preferred that this method returns an exact size
(or at least a bigger estimation) it’s not an error
to return an incorrect number. The penalty for doing
so is potentially incurring unnecessary re-allocations.
source§fn to_bytes(&self, ser: &mut Serializer) -> Result<()>
fn to_bytes(&self, ser: &mut Serializer) -> Result<()>
Serialize the instance into bytes by writing to
the provided
Serializer
.source§impl Humanize for ViewingKeyHashed
impl Humanize for ViewingKeyHashed
source§impl JsonSchema for ViewingKeyHashed
impl JsonSchema for ViewingKeyHashed
source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moresource§impl Serialize for ViewingKeyHashed
impl Serialize for ViewingKeyHashed
source§impl TryFrom<&[u8]> for ViewingKeyHashed
impl TryFrom<&[u8]> for ViewingKeyHashed
impl Copy for ViewingKeyHashed
Auto Trait Implementations§
impl RefUnwindSafe for ViewingKeyHashed
impl Send for ViewingKeyHashed
impl Sync for ViewingKeyHashed
impl Unpin for ViewingKeyHashed
impl UnwindSafe for ViewingKeyHashed
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> FadromaSerializeExt for Twhere
T: FadromaSerialize,
impl<T> FadromaSerializeExt for Twhere T: FadromaSerialize,
source§impl<T> ToHex for Twhere
T: AsRef<[u8]>,
impl<T> ToHex for Twhere T: AsRef<[u8]>,
source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Lower case
letters are used (e.g. f9b4ca
)source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Upper case
letters are used (e.g. F9B4CA
)