pub enum Message {
Show 19 variants
ClientSetup(ClientSetupSecureConnection),
ClientAuthentification(ClientAuthentication),
Insert(Insertion),
InsertOpe(InsertionOpe),
InsertResponse {
inserted_id: String,
},
Query(Query),
QueryResponse(QueryOutput),
SingleValueResponse {
data: Option<Vec<u8>>,
nonce: Option<Vec<u8>>,
},
Count(CountSubject),
CountResponse(u32),
Update(Update),
UpdateResponse {
status: UpdateStatus,
},
Delete(Delete),
DeleteResult(bool),
DeleteForUsecase {
collection: String,
id: String,
},
Drop(DropSubject),
DropResult(bool),
EndOfCommunication,
CloseCommunication,
}
Expand description
Enum representing different types of messages exchanged between the client and server.
Variants§
ClientSetup(ClientSetupSecureConnection)
Message sent by the client when setting up a secure connection.
The associated ClientSetupSecureConnection
contains the necessary information for establishing the secure connection.
ClientAuthentification(ClientAuthentication)
Message used for client authentication.
The associated ClientAuthentication
typically contains the credentials needed for authentication.
Insert(Insertion)
Used by the client to insert data into the database.
The Insertion
structure typically contains the data to be inserted along with metadata such as the collection in which the data should be stored.
InsertOpe(InsertionOpe)
Similar to Insert
, but used specifically for inserting data that is encrypted using Order-Preserving Encryption (OPE).
InsertResponse
Sent by the server in response to an Insert
message to acknowledge that the data has been inserted.
Contains the ID of the inserted data.
Query(Query)
Used by the client to query data from the database.
The Query
structure contains the necessary information to perform the data query.
QueryResponse(QueryOutput)
Sent by the server in response to a Query
message.
Contains the data retrieved as a result of the query.
SingleValueResponse
Sent by the server in response to a query that requests a single value. Contains the requested data, or None if it doesn’t exist.
Count(CountSubject)
Message sent by the client to request a count of documents that meet certain criteria.
The CountSubject
structure defines the criteria for counting.
CountResponse(u32)
Sent by the server in response to a Count
message.
Contains the number of documents that meet the specified criteria.
Update(Update)
Message sent by the client to request an update to existing data.
The Update
structure contains the details of what data should be updated and how.
UpdateResponse
Sent by the server in response to an Update
message to indicate the status of the update operation.
Fields
status: UpdateStatus
Delete(Delete)
Message sent by the client to request the deletion of data.
The Delete
structure contains the details of what data should be deleted.
DeleteResult(bool)
Sent by the server to indicate the result of a deletion request.
DeleteForUsecase
Message sent by the client to delete data for a specific use case. Contains the collection name and the ID of the document to be deleted.
Drop(DropSubject)
Message sent by the client to request the deletion of an entire collection or use case.
The DropSubject
structure defines what should be dropped.
DropResult(bool)
Sent by the server to indicate the result of a drop request.
EndOfCommunication
Message indicating the end of a communication sequence.
CloseCommunication
Message requesting the termination of the communication channel.