pub struct PreimageKey {
pub key_type: KeyType,
pub x: [u8; 31],
}Fields§
§key_type: KeyType§x: [u8; 31]Implementations§
Source§impl PreimageKey
impl PreimageKey
pub fn new(key_type: KeyType, x: [u8; 31]) -> Self
Sourcepub fn new_keccak(hash: [u8; 32]) -> Self
pub fn new_keccak(hash: [u8; 32]) -> Self
produce a key from 32 byte of a Keccak hash. The first byte is discarded and replaced by the type byte
Sourcepub fn new_sha256(hash: [u8; 32]) -> Self
pub fn new_sha256(hash: [u8; 32]) -> Self
produce a key from 32 byte of a Sha256 hash. The first byte is discarded and replaced by the type byte
Trait Implementations§
Source§impl Clone for PreimageKey
impl Clone for PreimageKey
Source§fn clone(&self) -> PreimageKey
fn clone(&self) -> PreimageKey
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 Debug for PreimageKey
impl Debug for PreimageKey
Source§impl Default for PreimageKey
impl Default for PreimageKey
Source§fn default() -> PreimageKey
fn default() -> PreimageKey
Returns the “default value” for a type. Read more
Source§impl From<PreimageKey> for [u8; 32]
impl From<PreimageKey> for [u8; 32]
Source§fn from(key: PreimageKey) -> Self
fn from(key: PreimageKey) -> Self
Converts to this type from the input type.
impl Copy for PreimageKey
Auto Trait Implementations§
impl Freeze for PreimageKey
impl RefUnwindSafe for PreimageKey
impl Send for PreimageKey
impl Sync for PreimageKey
impl Unpin for PreimageKey
impl UnwindSafe for PreimageKey
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