Enum pliantdb_core::transaction::Command[][src]

pub enum Command<'a> {
    Insert {
        contents: Cow<'a, [u8]>,
    },
    Update {
        header: Cow<'a, Header>,
        contents: Cow<'a, [u8]>,
    },
    Delete {
        header: Cow<'a, Header>,
    },
}
Expand description

A command to execute within a Collection.

Variants

Insert

Inserts a new document containing contents.

Show fields

Fields of Insert

contents: Cow<'a, [u8]>

The initial contents of the document.

Update

Update an existing Document identified by id. revision must match the currently stored revision on the Document. If it does not, the command fill fail with a DocumentConflict error.

Show fields

Fields of Update

header: Cow<'a, Header>

The current header of the Document.

contents: Cow<'a, [u8]>

The new contents to store within the Document.

Delete

Delete an existing Document identified by id. revision must match the currently stored revision on the Document. If it does not, the command fill fail with a DocumentConflict error.

Show fields

Fields of Delete

header: Cow<'a, Header>

The current header of the Document.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.