[−][src]Enum redis_protocol::types::Frame
An enum representing a Frame of data. Frames are recursively defined to account for arrays.
Variants
SimpleString(String)
Error(String)
Integer(i64)
BulkString(Vec<u8>)
Array(Vec<Frame>)
Moved(String)
Ask(String)
Null
Methods
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.
Trait Implementations
impl PartialEq<Frame> for Frame
[src]
impl Eq for Frame
[src]
impl Clone for Frame
[src]
fn clone(&self) -> Frame
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for Frame
[src]
Auto Trait Implementations
impl Send for Frame
impl Unpin for Frame
impl Sync for Frame
impl UnwindSafe for Frame
impl RefUnwindSafe for Frame
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &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, 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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,