pub struct CoSetTransaction<S, K>where
S: AnyBlockStorage,
K: Hash + Ord + Clone + Serialize + DeserializeOwned + Send + Sync + 'static,{ /* private fields */ }Implementations§
Source§impl<S, K> CoSetTransaction<S, K>where
S: AnyBlockStorage,
K: Hash + Ord + Clone + Serialize + DeserializeOwned + Send + Sync + 'static,
impl<S, K> CoSetTransaction<S, K>where
S: AnyBlockStorage,
K: Hash + Ord + Clone + Serialize + DeserializeOwned + Send + Sync + 'static,
pub async fn contains(&self, key: &K) -> Result<bool, StorageError>
pub fn stream(&self) -> impl Stream<Item = Result<K, StorageError>> + '_
pub async fn insert(&mut self, key: K) -> Result<(), StorageError>
Sourcepub async fn remove(&mut self, key: K) -> Result<bool, StorageError>
pub async fn remove(&mut self, key: K) -> Result<bool, StorageError>
Remove key from set and return true if it was present.
Sourcepub async fn store(&mut self) -> Result<CoSet<K>, StorageError>
pub async fn store(&mut self) -> Result<CoSet<K>, StorageError>
Store as new CoSet
Trait Implementations§
Source§impl<S, K> Clone for CoSetTransaction<S, K>where
S: AnyBlockStorage + Clone,
K: Hash + Ord + Clone + Serialize + DeserializeOwned + Send + Sync + 'static + Clone,
impl<S, K> Clone for CoSetTransaction<S, K>where
S: AnyBlockStorage + Clone,
K: Hash + Ord + Clone + Serialize + DeserializeOwned + Send + Sync + 'static + Clone,
Source§fn clone(&self) -> CoSetTransaction<S, K>
fn clone(&self) -> CoSetTransaction<S, K>
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 moreAuto Trait Implementations§
impl<S, K> Freeze for CoSetTransaction<S, K>where
S: Freeze,
impl<S, K> RefUnwindSafe for CoSetTransaction<S, K>where
S: RefUnwindSafe,
K: RefUnwindSafe,
impl<S, K> Send for CoSetTransaction<S, K>
impl<S, K> Sync for CoSetTransaction<S, K>
impl<S, K> Unpin for CoSetTransaction<S, K>
impl<S, K> UnsafeUnpin for CoSetTransaction<S, K>where
S: UnsafeUnpin,
impl<S, K> UnwindSafe for CoSetTransaction<S, K>
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