pub struct MutableItem { /* private fields */ }
Expand description
Bep_0044’s Mutable item.
Implementations§
Source§impl MutableItem
impl MutableItem
Sourcepub fn new(
signer: SigningKey,
value: Bytes,
seq: i64,
salt: Option<Bytes>,
) -> Self
pub fn new( signer: SigningKey, value: Bytes, seq: i64, salt: Option<Bytes>, ) -> Self
Create a new mutable item from a signing key, value, sequence number and optional salt.
Sourcepub fn target_from_key(public_key: &[u8; 32], salt: &Option<Bytes>) -> Id
pub fn target_from_key(public_key: &[u8; 32], salt: &Option<Bytes>) -> Id
Return the target of a MutableItem by hashing its public_key
and an optional salt
Sourcepub fn new_signed_unchecked(
key: [u8; 32],
signature: [u8; 64],
value: Bytes,
seq: i64,
salt: Option<Bytes>,
) -> Self
pub fn new_signed_unchecked( key: [u8; 32], signature: [u8; 64], value: Bytes, seq: i64, salt: Option<Bytes>, ) -> Self
Create a new mutable item from an already signed value.
pub fn target(&self) -> &Id
pub fn key(&self) -> &[u8; 32]
pub fn value(&self) -> &Bytes
pub fn seq(&self) -> &i64
pub fn signature(&self) -> &[u8; 64]
pub fn salt(&self) -> &Option<Bytes>
pub fn cas(&self) -> &Option<i64>
Trait Implementations§
Source§impl Clone for MutableItem
impl Clone for MutableItem
Source§fn clone(&self) -> MutableItem
fn clone(&self) -> MutableItem
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 MutableItem
impl Debug for MutableItem
Source§impl PartialEq for MutableItem
impl PartialEq for MutableItem
impl StructuralPartialEq for MutableItem
Auto Trait Implementations§
impl !Freeze for MutableItem
impl RefUnwindSafe for MutableItem
impl Send for MutableItem
impl Sync for MutableItem
impl Unpin for MutableItem
impl UnwindSafe for MutableItem
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