pub enum Response {
Success(Option<Vec<u8>>),
Document(Option<Document>),
Documents(Vec<Document>),
Message(String),
Done,
Error(String),
}Expand description
Represents a response sent from the server to a client.
Variants§
Success(Option<Vec<u8>>)
A successful operation with an optional value.
Document(Option<Document>)
A successful operation with a Document.
Documents(Vec<Document>)
A successful operation with a list of Documents.
Message(String)
A successful operation with a string response (e.g., a document ID).
Done
A successful operation with no return value.
Error(String)
An error occurred.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Response
impl<'de> Deserialize<'de> for Response
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 Response
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnwindSafe for Response
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