[][src]Struct safe_nd::MDataSeqEntryActions

pub struct MDataSeqEntryActions { /* fields omitted */ }

Sequenced Entry Actions for given entry keys.

Methods

impl SeqEntryActions[src]

pub fn new() -> Self[src]

Creates a new sequenced Entry Actions list.

pub fn actions(&self) -> &BTreeMap<Vec<u8>, SeqEntryAction>[src]

Gets the actions.

pub fn into_actions(self) -> BTreeMap<Vec<u8>, SeqEntryAction>[src]

Converts self to a map of the keys with their corresponding action.

pub fn ins(self, key: Vec<u8>, content: Vec<u8>, version: u64) -> Self[src]

Inserts a new key-value pair.

Requires the new version of the sequenced entry content. If it does not match the current version + 1, an error will be returned.

pub fn update(self, key: Vec<u8>, content: Vec<u8>, version: u64) -> Self[src]

Updates an existing key-value pair.

Requires the new version of the sequenced entry content. If it does not match the current version + 1, an error will be returned.

pub fn del(self, key: Vec<u8>, version: u64) -> Self[src]

Deletes an entry.

Requires the new version of the sequenced entry content. If it does not match the current version + 1, an error will be returned.

pub fn add_action(&mut self, key: Vec<u8>, action: SeqEntryAction)[src]

Adds an action to the list of actions, replacing it if it is already present.

Trait Implementations

impl Clone for SeqEntryActions[src]

impl Debug for SeqEntryActions[src]

impl Default for SeqEntryActions[src]

impl<'de> Deserialize<'de> for SeqEntryActions[src]

impl Eq for SeqEntryActions[src]

impl From<BTreeMap<Vec<u8>, SeqEntryAction>> for SeqEntryActions[src]

impl From<SeqEntryActions> for BTreeMap<Vec<u8>, SeqEntryAction>[src]

impl From<SeqEntryActions> for EntryActions[src]

impl Hash for SeqEntryActions[src]

impl Ord for SeqEntryActions[src]

impl PartialEq<SeqEntryActions> for SeqEntryActions[src]

impl PartialOrd<SeqEntryActions> for SeqEntryActions[src]

impl Serialize for SeqEntryActions[src]

impl StructuralEq for SeqEntryActions[src]

impl StructuralPartialEq for SeqEntryActions[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Clear for T where
    T: InitializableFromZeroed + ?Sized

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T> InitializableFromZeroed for T where
    T: Default

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.