pub enum WalOp {
Upsert(Document),
Delete(String),
}Expand description
One mutation recorded in the write-ahead log.
Ops replay in log order, and within a WAL object in list order. The last op touching an id wins, whether that is an upsert or a delete.
§JSON form
Externally tagged, snake_case:
[{"upsert": {"id": "a", "vector": [1.0, 2.0]}}, {"delete": "b"}]Variants§
Upsert(Document)
Insert the document, or replace the one with the same id.
Delete(String)
Remove the document with this id. Deleting an id that does not exist is not an error.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for WalOp
impl<'de> Deserialize<'de> for WalOp
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
impl StructuralPartialEq for WalOp
Auto Trait Implementations§
impl Forget for WalOp
impl Freeze for WalOp
impl Move for WalOp
impl RefUnwindSafe for WalOp
impl Send for WalOp
impl Sync for WalOp
impl Unpin for WalOp
impl UnsafeUnpin for WalOp
impl UnwindSafe for WalOp
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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