pub enum Frame {
Simple(String),
Error(String),
Integer(u64),
Bulk(Bytes),
Null,
Array(Vec<Frame>),
}Expand description
A frame in the Redis protocol.
Variants§
Implementations§
Source§impl Frame
impl Frame
Sourcepub fn push_bulk(&mut self, bytes: Bytes)
pub fn push_bulk(&mut self, bytes: Bytes)
Push a “bulk” frame into the array. self must be an Array frame.
§Panics
panics if self is not an array
Sourcepub fn push_int(&mut self, value: u64)
pub fn push_int(&mut self, value: u64)
Push an “integer” frame into the array. self must be an Array frame.
§Panics
panics if self is not an array
Sourcepub fn check(src: &mut Cursor<&[u8]>) -> Result<(), FrameError>
pub fn check(src: &mut Cursor<&[u8]>) -> Result<(), FrameError>
Checks if an entire message can be decoded from src
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Frame
impl RefUnwindSafe for Frame
impl Send for Frame
impl Sync for Frame
impl Unpin for Frame
impl UnwindSafe for Frame
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