pub struct AteHash {
pub val: [u8; 16],
}Expand description
Represents a hash of a piece of data that is cryptographically secure enough that it can be used for integrity but small enough that it does not bloat the redo log metadata.
Fields§
§val: [u8; 16]Implementations§
Source§impl AteHash
impl AteHash
pub const LEN: usize = 16usize
pub fn generate() -> AteHash
pub fn from_hex_string(input: &str) -> Option<AteHash>
pub fn from_bytes(input: &[u8]) -> AteHash
pub fn from_bytes_twice(input1: &[u8], input2: &[u8]) -> AteHash
pub fn from_bytes_blake3(input: &[u8]) -> AteHash
pub fn from_bytes_sha3(input: &[u8], repeat: i32) -> AteHash
pub fn to_u64(&self) -> u64
pub fn to_hex_string(&self) -> String
pub fn to_4hex(&self) -> String
pub fn to_8hex(&self) -> String
pub fn to_string(&self) -> String
pub fn to_base64(&self) -> String
pub fn as_bytes(&self) -> &[u8; 16]
pub fn to_iv(&self) -> InitializationVector
pub fn len(&self) -> usize
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AteHash
impl<'de> Deserialize<'de> for AteHash
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 From<AteHash> for PrimaryKey
impl From<AteHash> for PrimaryKey
Source§fn from(val: AteHash) -> PrimaryKey
fn from(val: AteHash) -> PrimaryKey
Converts to this type from the input type.
Source§impl Ord for AteHash
impl Ord for AteHash
Source§impl PartialOrd for AteHash
impl PartialOrd for AteHash
impl Copy for AteHash
impl Eq for AteHash
impl StructuralPartialEq for AteHash
Auto Trait Implementations§
impl Freeze for AteHash
impl RefUnwindSafe for AteHash
impl Send for AteHash
impl Sync for AteHash
impl Unpin for AteHash
impl UnwindSafe for AteHash
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<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.