pub enum Frame {
Simple(String),
Error(String),
Integer(u64),
Bulk(Bytes),
Null,
Array(Vec<Frame>),
}Variants§
Implementations§
Source§impl Frame
impl Frame
pub fn array() -> Frame
pub fn push_bulk(&mut self, bytes: Bytes)
pub fn push_int(&mut self, value: u64)
pub fn check(src: &mut Cursor<&[u8]>) -> Result<(), Error>
pub fn parse(src: &mut Cursor<&[u8]>) -> Result<Frame, Error>
pub fn to_error(&self) -> Box<dyn Error + Send + Sync>
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