pub struct SetMut<'a> { /* private fields */ }Expand description
Mutable reference to a Set CRDT.
Obtained through Transaction::get_set_mut() or Transaction::set_by_id().
Implementations§
Source§impl<'a> SetMut<'a>
impl<'a> SetMut<'a>
Sourcepub fn add(&mut self, value: impl Into<PrimitiveValue>)
pub fn add(&mut self, value: impl Into<PrimitiveValue>)
Add a primitive value to the set.
Accepts any type that implements Into<PrimitiveValue>:
bool, i64, i32, String, &str, or () for nil.
Sourcepub fn remove(&mut self, value: impl Into<PrimitiveValue>)
pub fn remove(&mut self, value: impl Into<PrimitiveValue>)
Remove a primitive value from the set.
With OR-Set semantics, this removes all observed instances of the value.
Accepts any type that implements Into<PrimitiveValue>.
Sourcepub fn remove_str(&mut self, s: &str)
pub fn remove_str(&mut self, s: &str)
Remove a string from the set.
Sourcepub fn remove_int(&mut self, n: i64)
pub fn remove_int(&mut self, n: i64)
Remove an integer from the set.
Auto Trait Implementations§
impl<'a> Freeze for SetMut<'a>
impl<'a> RefUnwindSafe for SetMut<'a>
impl<'a> Send for SetMut<'a>
impl<'a> Sync for SetMut<'a>
impl<'a> Unpin for SetMut<'a>
impl<'a> UnsafeUnpin for SetMut<'a>
impl<'a> !UnwindSafe for SetMut<'a>
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