pub struct Record { /* private fields */ }Implementations§
Source§impl Record
impl Record
pub fn sign<'a>( topic: [u8; 32], unix_minute: u64, node_id: [u8; 32], record_content: impl Serialize + Deserialize<'a>, signing_key: &SigningKey, ) -> Result<Self>
pub fn from_bytes(buf: Vec<u8>) -> Result<Self>
pub fn to_bytes(&self) -> Vec<u8> ⓘ
pub fn verify( &self, actual_topic: &[u8; 32], actual_unix_minute: u64, ) -> Result<()>
pub fn encrypt(&self, encryption_key: &SigningKey) -> EncryptedRecord
Trait Implementations§
impl Eq for Record
impl StructuralPartialEq for Record
Auto Trait Implementations§
impl Freeze for Record
impl RefUnwindSafe for Record
impl Send for Record
impl Sync for Record
impl Unpin for Record
impl UnwindSafe for Record
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.