pub enum Request {
Get(String),
Put(String, Vec<u8>),
Delete(String),
NewCollection {
name: String,
fields: Vec<(String, FieldType, bool)>,
},
Insert {
collection: String,
data: HashMap<String, Value>,
},
GetDocument {
collection: String,
id: String,
},
Query(SimpleQueryBuilder),
BeginTransaction,
CommitTransaction,
RollbackTransaction,
}Expand description
Represents a request sent from a client to the server.
Variants§
Get(String)
Get a value by key.
Put(String, Vec<u8>)
Put a value by key.
Delete(String)
Delete a key.
NewCollection
Create a new collection.
Insert
Insert a document into a collection.
GetDocument
Get a document from a collection by ID.
Query(SimpleQueryBuilder)
Query a collection.
BeginTransaction
Begin a transaction.
CommitTransaction
Commit the current transaction.
RollbackTransaction
Roll back the current transaction.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Request
impl<'de> Deserialize<'de> for Request
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
Auto Trait Implementations§
impl Freeze for Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnwindSafe for Request
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