pub struct MapSeqEntryActions { /* private fields */ }Expand description
Sequenced Entry Actions for given entry keys.
Implementations§
Source§impl SeqEntryActions
impl SeqEntryActions
Sourcepub fn into_actions(self) -> BTreeMap<Vec<u8>, SeqEntryAction>
pub fn into_actions(self) -> BTreeMap<Vec<u8>, SeqEntryAction>
Converts self to a map of the keys with their corresponding action.
Sourcepub fn ins(self, key: Vec<u8>, content: Vec<u8>, version: u64) -> Self
pub fn ins(self, key: Vec<u8>, content: Vec<u8>, version: u64) -> Self
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.
Sourcepub fn update(self, key: Vec<u8>, content: Vec<u8>, version: u64) -> Self
pub fn update(self, key: Vec<u8>, content: Vec<u8>, version: u64) -> Self
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.
Sourcepub fn del(self, key: Vec<u8>, version: u64) -> Self
pub fn del(self, key: Vec<u8>, version: u64) -> Self
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.
Sourcepub fn add_action(&mut self, key: Vec<u8>, action: SeqEntryAction)
pub fn add_action(&mut self, key: Vec<u8>, action: SeqEntryAction)
Adds an action to the list of actions, replacing it if it is already present.
Trait Implementations§
Source§impl Clone for SeqEntryActions
impl Clone for SeqEntryActions
Source§fn clone(&self) -> SeqEntryActions
fn clone(&self) -> SeqEntryActions
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 SeqEntryActions
impl Debug for SeqEntryActions
Source§impl Default for SeqEntryActions
impl Default for SeqEntryActions
Source§fn default() -> SeqEntryActions
fn default() -> SeqEntryActions
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SeqEntryActions
impl<'de> Deserialize<'de> for SeqEntryActions
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<BTreeMap<Vec<u8>, SeqEntryAction>> for SeqEntryActions
impl From<BTreeMap<Vec<u8>, SeqEntryAction>> for SeqEntryActions
Source§impl From<SeqEntryActions> for BTreeMap<Vec<u8>, SeqEntryAction>
impl From<SeqEntryActions> for BTreeMap<Vec<u8>, SeqEntryAction>
Source§fn from(actions: SeqEntryActions) -> Self
fn from(actions: SeqEntryActions) -> Self
Converts to this type from the input type.
Source§impl From<SeqEntryActions> for EntryActions
impl From<SeqEntryActions> for EntryActions
Source§fn from(entry_actions: SeqEntryActions) -> Self
fn from(entry_actions: SeqEntryActions) -> Self
Converts to this type from the input type.
Source§impl Hash for SeqEntryActions
impl Hash for SeqEntryActions
Source§impl Ord for SeqEntryActions
impl Ord for SeqEntryActions
Source§fn cmp(&self, other: &SeqEntryActions) -> Ordering
fn cmp(&self, other: &SeqEntryActions) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for SeqEntryActions
impl PartialEq for SeqEntryActions
Source§impl PartialOrd for SeqEntryActions
impl PartialOrd for SeqEntryActions
Source§impl Serialize for SeqEntryActions
impl Serialize for SeqEntryActions
impl Eq for SeqEntryActions
impl StructuralPartialEq for SeqEntryActions
Auto Trait Implementations§
impl Freeze for SeqEntryActions
impl RefUnwindSafe for SeqEntryActions
impl Send for SeqEntryActions
impl Sync for SeqEntryActions
impl Unpin for SeqEntryActions
impl UnwindSafe for SeqEntryActions
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more