Enum redis_protocol::resp3::types::DecodedFrame
source · [−]pub enum DecodedFrame {
Streaming(StreamedFrame),
Complete(Frame),
}
Expand description
Wrapper enum around a decoded frame that supports streaming frames.
Variants
Streaming(StreamedFrame)
Complete(Frame)
Implementations
sourceimpl DecodedFrame
impl DecodedFrame
sourcepub fn add_attributes(
&mut self,
attributes: Attributes
) -> Result<(), RedisProtocolError>
pub fn add_attributes(
&mut self,
attributes: Attributes
) -> Result<(), RedisProtocolError>
Add attributes to the decoded frame, if possible.
sourcepub fn into_complete_frame(self) -> Result<Frame, RedisProtocolError>
pub fn into_complete_frame(self) -> Result<Frame, RedisProtocolError>
Convert the decoded frame to a complete frame, returning an error if a streaming variant is found.
sourcepub fn into_streaming_frame(self) -> Result<StreamedFrame, RedisProtocolError>
pub fn into_streaming_frame(self) -> Result<StreamedFrame, RedisProtocolError>
Convert the decoded frame into a streaming frame, returning an error if a complete variant is found.
sourcepub fn is_streaming(&self) -> bool
pub fn is_streaming(&self) -> bool
Whether or not the decoded frame starts a stream.
sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Whether or not the decoded frame is a complete frame.
Trait Implementations
sourceimpl Debug for DecodedFrame
impl Debug for DecodedFrame
sourceimpl PartialEq<DecodedFrame> for DecodedFrame
impl PartialEq<DecodedFrame> for DecodedFrame
sourcefn eq(&self, other: &DecodedFrame) -> bool
fn eq(&self, other: &DecodedFrame) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &DecodedFrame) -> bool
fn ne(&self, other: &DecodedFrame) -> bool
This method tests for !=
.
impl Eq for DecodedFrame
impl StructuralEq for DecodedFrame
impl StructuralPartialEq for DecodedFrame
Auto Trait Implementations
impl RefUnwindSafe for DecodedFrame
impl Send for DecodedFrame
impl Sync for DecodedFrame
impl Unpin for DecodedFrame
impl UnwindSafe for DecodedFrame
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