pub enum ResponseBytes {
Values(Vec<ValueBytes>),
Stored,
NotStored,
Deleted,
NotFound,
Exists,
Ok,
Numeric(u64),
Version(Bytes),
Error,
ClientError(Bytes),
ServerError(Bytes),
}Expand description
A parsed Memcache response using zero-copy Bytes for string fields.
Variants§
Values(Vec<ValueBytes>)
Value response from GET (may contain multiple values for multi-get)
Stored
STORED response from SET
NotStored
NOT_STORED response from SET
Deleted
DELETED response from DELETE
NotFound
NOT_FOUND response from DELETE
Exists
EXISTS response from CAS
Ok
OK response (from flush_all, touch, etc.)
Numeric(u64)
Numeric response from INCR/DECR (the new value after the operation).
Version(Bytes)
VERSION response
Error
Generic error
ClientError(Bytes)
Client error with message
ServerError(Bytes)
Server error with message
Implementations§
Source§impl ResponseBytes
impl ResponseBytes
Sourcepub fn parse(data: Bytes) -> Result<(Self, usize), ParseError>
pub fn parse(data: Bytes) -> Result<(Self, usize), ParseError>
Parse a response from a Bytes buffer, returning zero-copy slices.
Same parsing logic as Response::parse but returns Bytes::slice()
references into the input buffer instead of copying into Vec<u8>.
Trait Implementations§
Source§impl Clone for ResponseBytes
impl Clone for ResponseBytes
Source§fn clone(&self) -> ResponseBytes
fn clone(&self) -> ResponseBytes
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ResponseBytes
impl Debug for ResponseBytes
Source§impl PartialEq for ResponseBytes
impl PartialEq for ResponseBytes
impl Eq for ResponseBytes
impl StructuralPartialEq for ResponseBytes
Auto Trait Implementations§
impl !Freeze for ResponseBytes
impl RefUnwindSafe for ResponseBytes
impl Send for ResponseBytes
impl Sync for ResponseBytes
impl Unpin for ResponseBytes
impl UnsafeUnpin for ResponseBytes
impl UnwindSafe for ResponseBytes
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