pub enum BorrowedFrame<'a> {
Show 16 variants
BlobString {
data: &'a [u8],
attributes: Option<BorrowedAttrs<'a>>,
},
BlobError {
data: &'a [u8],
attributes: Option<BorrowedAttrs<'a>>,
},
SimpleString {
data: &'a [u8],
attributes: Option<BorrowedAttrs<'a>>,
},
SimpleError {
data: &'a str,
attributes: Option<BorrowedAttrs<'a>>,
},
Boolean {
data: bool,
attributes: Option<BorrowedAttrs<'a>>,
},
Null,
Number {
data: i64,
attributes: Option<BorrowedAttrs<'a>>,
},
Double {
data: f64,
attributes: Option<BorrowedAttrs<'a>>,
},
BigNumber {
data: &'a [u8],
attributes: Option<BorrowedAttrs<'a>>,
},
VerbatimString {
data: &'a [u8],
format: VerbatimStringFormat,
attributes: Option<BorrowedAttrs<'a>>,
},
Array {
data: &'a [BorrowedFrame<'a>],
attributes: Option<BorrowedAttrs<'a>>,
},
Map {
data: &'a FrameMap<BorrowedFrame<'a>, BorrowedFrame<'a>>,
attributes: Option<BorrowedAttrs<'a>>,
},
Set {
data: &'a FrameSet<BorrowedFrame<'a>>,
attributes: Option<BorrowedAttrs<'a>>,
},
Push {
data: &'a [BorrowedFrame<'a>],
attributes: Option<BorrowedAttrs<'a>>,
},
Hello {
version: RespVersion,
auth: Option<(&'a str, &'a str)>,
setname: Option<&'a str>,
},
ChunkedString(&'a [u8]),
}
Available on crate feature
resp3
only.Expand description
A borrowed frame variant, typically used for encoding use cases.
Variants§
BlobString
A blob of bytes.
BlobError
A blob representing an error.
SimpleString
A small string.
SimpleError
A small string representing an error.
Boolean
A boolean type.
Null
A null type.
Number
A signed 64-bit integer.
Double
A signed 64-bit floating point number.
BigNumber
A large number not representable as a Number
or Double
.
VerbatimString
A string to be displayed without any escaping or filtering.
Array
An array of frames.
Map
An unordered map of key-value pairs.
Fields
§
data: &'a FrameMap<BorrowedFrame<'a>, BorrowedFrame<'a>>
§
attributes: Option<BorrowedAttrs<'a>>
Set
An unordered collection of other frames with a uniqueness constraint.
Push
Out-of-band data.
Hello
A special frame type used when first connecting to the server to describe the protocol version and optional credentials.
ChunkedString(&'a [u8])
One chunk of a streaming blob.
Implementations§
Source§impl<'a> BorrowedFrame<'a>
impl<'a> BorrowedFrame<'a>
Trait Implementations§
Source§impl<'a> Clone for BorrowedFrame<'a>
impl<'a> Clone for BorrowedFrame<'a>
Source§fn clone(self: &BorrowedFrame<'a>) -> BorrowedFrame<'a>
fn clone(self: &BorrowedFrame<'a>) -> BorrowedFrame<'a>
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<'a> Debug for BorrowedFrame<'a>
impl<'a> Debug for BorrowedFrame<'a>
Source§impl Encoder<BorrowedFrame<'_>> for Resp3
Available on crate feature codec
only.
impl Encoder<BorrowedFrame<'_>> for Resp3
Available on crate feature
codec
only.Source§impl<'a> Hash for BorrowedFrame<'a>
impl<'a> Hash for BorrowedFrame<'a>
Source§impl<'a> PartialEq for BorrowedFrame<'a>
impl<'a> PartialEq for BorrowedFrame<'a>
impl Eq for BorrowedFrame<'_>
impl<'a> StructuralPartialEq for BorrowedFrame<'a>
Auto Trait Implementations§
impl<'a> Freeze for BorrowedFrame<'a>
impl<'a> RefUnwindSafe for BorrowedFrame<'a>
impl<'a> Send for BorrowedFrame<'a>
impl<'a> Sync for BorrowedFrame<'a>
impl<'a> Unpin for BorrowedFrame<'a>
impl<'a> UnwindSafe for BorrowedFrame<'a>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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