Enum redis_protocol::resp3::types::FrameKind
source · pub enum FrameKind {
Show 18 variants
Array,
BlobString,
SimpleString,
SimpleError,
Number,
Null,
Double,
Boolean,
BlobError,
VerbatimString,
Map,
Set,
Attribute,
Push,
Hello,
BigNumber,
ChunkedString,
EndStream,
}Available on crate feature
resp3 only.Expand description
The type of frame without any associated data.
Variants§
Array
BlobString
SimpleString
SimpleError
Number
Null
Double
Boolean
BlobError
VerbatimString
Map
Set
Attribute
Push
Hello
BigNumber
ChunkedString
EndStream
Implementations§
source§impl FrameKind
impl FrameKind
sourcepub fn is_aggregate_type(&self) -> bool
pub fn is_aggregate_type(&self) -> bool
Whether the frame is an aggregate type (array, set, map).
sourcepub fn is_streaming_type(&self) -> bool
pub fn is_streaming_type(&self) -> bool
Whether the frame is an aggregate type or blob string.
sourcepub fn can_hash(&self) -> bool
pub fn can_hash(&self) -> bool
Whether the frame can be used as a key in a HashMap or HashSet.
Not all frame types can be hashed, and trying to do so can panic. This function can be used to handle this gracefully.
sourcepub fn hash_prefix(&self) -> &'static str
pub fn hash_prefix(&self) -> &'static str
A function used to differentiate data types that may have the same inner binary representation when hashing.
Trait Implementations§
source§impl Ord for FrameKind
impl Ord for FrameKind
source§impl PartialEq for FrameKind
impl PartialEq for FrameKind
source§impl PartialOrd for FrameKind
impl PartialOrd for FrameKind
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl Copy for FrameKind
impl Eq for FrameKind
impl StructuralPartialEq for FrameKind
Auto Trait Implementations§
impl Freeze for FrameKind
impl RefUnwindSafe for FrameKind
impl Send for FrameKind
impl Sync for FrameKind
impl Unpin for FrameKind
impl UnwindSafe for FrameKind
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