Enum bonsaidb_core::networking::DatabaseResponse
source · [−]pub enum DatabaseResponse {
Documents(Vec<OwnedDocument>),
Count(u64),
TransactionResults(Vec<OperationResult>),
ViewMappings(Vec<Serialized>),
ViewMappingsWithDocs(MappedSerializedDocuments),
ViewReduction(Bytes),
ViewGroupedReduction(Vec<MappedSerializedValue>),
ExecutedTransactions(Vec<Executed>),
LastTransactionId(Option<u64>),
SubscriberCreated {
subscriber_id: u64,
},
MessageReceived {
subscriber_id: u64,
topic: String,
payload: Bytes,
},
KvOutput(Output),
}Expand description
A response to a DatabaseRequest.
Variants
Documents(Vec<OwnedDocument>)
One or more documents.
Count(u64)
A result count.
TransactionResults(Vec<OperationResult>)
Results of DatabaseRequest::ApplyTransaction.
ViewMappings(Vec<Serialized>)
Results of DatabaseRequest::Query when with_docs is false.
ViewMappingsWithDocs(MappedSerializedDocuments)
Results of DatabaseRequest::Query when with_docs is true.
ViewReduction(Bytes)
Result of DatabaseRequest::Reduce when grouped is false.
ViewGroupedReduction(Vec<MappedSerializedValue>)
Result of DatabaseRequest::Reduce when grouped is true.
ExecutedTransactions(Vec<Executed>)
Results of DatabaseRequest::ListExecutedTransactions.
LastTransactionId(Option<u64>)
Result of DatabaseRequest::LastTransactionId.
SubscriberCreated
Fields
subscriber_id: u64The unique ID of the subscriber.
A new PubSub subscriber was created.
MessageReceived
Fields
subscriber_id: u64The ID of the subscriber receiving the message.
topic: StringThe topic the payload was received on.
payload: BytesThe message payload.
A PubSub message was received.
KvOutput(Output)
Output from a KeyOperation being executed.
Trait Implementations
sourceimpl Clone for DatabaseResponse
impl Clone for DatabaseResponse
sourcefn clone(&self) -> DatabaseResponse
fn clone(&self) -> DatabaseResponse
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for DatabaseResponse
impl Debug for DatabaseResponse
sourceimpl<'de> Deserialize<'de> for DatabaseResponse
impl<'de> Deserialize<'de> for DatabaseResponse
sourcefn 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
sourceimpl Serialize for DatabaseResponse
impl Serialize for DatabaseResponse
Auto Trait Implementations
impl RefUnwindSafe for DatabaseResponse
impl Send for DatabaseResponse
impl Sync for DatabaseResponse
impl Unpin for DatabaseResponse
impl UnwindSafe for DatabaseResponse
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more