pub enum DecodedRangeFrame {
Complete(RangeFrame),
Streaming(StreamedRangeFrame),
}
Available on crate feature
resp3
only.Expand description
A reference-free frame type representing ranges into an associated buffer, typically used to implement zero-copy parsing.
Variants§
Complete(RangeFrame)
Streaming(StreamedRangeFrame)
Implementations§
Source§impl DecodedRangeFrame
impl DecodedRangeFrame
Sourcepub fn add_attributes(
&mut self,
attributes: RangeAttributes,
) -> Result<(), RedisProtocolError>
pub fn add_attributes( &mut self, attributes: RangeAttributes, ) -> Result<(), RedisProtocolError>
Add attributes to the decoded frame, if possible.
Sourcepub fn into_complete_frame(self) -> Result<RangeFrame, RedisProtocolError>
pub fn into_complete_frame(self) -> Result<RangeFrame, RedisProtocolError>
Convert the decoded frame to a complete frame, returning an error if a streaming variant is found.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DecodedRangeFrame
impl RefUnwindSafe for DecodedRangeFrame
impl Send for DecodedRangeFrame
impl Sync for DecodedRangeFrame
impl Unpin for DecodedRangeFrame
impl UnwindSafe for DecodedRangeFrame
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more