Enum redis_protocol::types::Frame [−][src]
An enum representing a Frame of data. Frames are recursively defined to account for arrays.
Variants
SimpleString(String)Error(String)Integer(i64)Moved(String)Ask(String)Implementations
impl Frame[src]
pub fn is_error(&self) -> bool[src]
Whether or not the frame is an error.
pub fn is_pubsub_message(&self) -> bool[src]
Whether or not the frame represents a message on a publish-subscribe channel.
pub fn is_pattern_pubsub_message(&self) -> bool[src]
Whether or not the frame represents a message on a publish-subscribe channel matched against a pattern subscription.
pub fn kind(&self) -> FrameKind[src]
Read the FrameKind value for this frame.
pub fn as_str(&self) -> Option<&str>[src]
Attempt to read the frame value as a string slice.
pub fn is_string(&self) -> bool[src]
Whether or not the frame is a simple string or bulk string.
pub fn is_null(&self) -> bool[src]
Whether or not the frame is Null.
pub fn is_array(&self) -> bool[src]
Whether or not the frame is an array of frames.
pub fn is_integer(&self) -> bool[src]
Whether or not the frame is an integer.
pub fn is_moved_or_ask_error(&self) -> bool[src]
Whether or not the framed is a a Moved or Ask error.
pub fn to_string(&self) -> Option<String>[src]
pub fn parse_as_pubsub(self) -> Result<(String, String), Self>[src]
Attempt to parse the frame as a publish-subscribe message, returning the (channel, message) tuple
if successful, or the original frame if the inner data is not a publish-subscribe message.
pub fn to_redirection(&self) -> Result<Redirection, RedisProtocolError<'_>>[src]
Attempt to parse the frame as a cluster redirection.
Trait Implementations
impl Clone for Frame[src]
impl Debug for Frame[src]
impl Eq for Frame[src]
impl<'a> From<&'a Redirection> for Frame[src]
fn from(redirection: &'a Redirection) -> Self[src]
impl From<Redirection> for Frame[src]
fn from(redirection: Redirection) -> Self[src]
impl PartialEq<Frame> for Frame[src]
impl StructuralEq for Frame[src]
impl StructuralPartialEq for Frame[src]
Auto Trait Implementations
impl RefUnwindSafe for Frame
impl Send for Frame
impl Sync for Frame
impl Unpin for Frame
impl UnwindSafe for Frame
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,