Trait FromResp2

Source
pub trait FromResp2<F: Resp2Frame>: Sized {
    // Required method
    fn from_frame(frame: F) -> Result<Self, RedisProtocolError>;

    // Provided method
    fn from_frames(frames: Vec<F>) -> Result<Vec<Self>, RedisProtocolError> { ... }
}
Available on crate features convert and resp2 only.
Expand description

A trait used to convert frames into various other types.

Required Methods§

Source

fn from_frame(frame: F) -> Result<Self, RedisProtocolError>

Convert a frame to the destination type.

Provided Methods§

Source

fn from_frames(frames: Vec<F>) -> Result<Vec<Self>, RedisProtocolError>

Convert multiple frames to the destination type.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl FromResp2<BytesFrame> for bool

Available on crate feature bytes only.
Source§

impl FromResp2<BytesFrame> for f32

Available on crate feature bytes only.
Source§

impl FromResp2<BytesFrame> for f64

Available on crate feature bytes only.
Source§

impl FromResp2<BytesFrame> for i8

Available on crate feature bytes only.
Source§

impl FromResp2<BytesFrame> for i16

Available on crate feature bytes only.
Source§

impl FromResp2<BytesFrame> for i32

Available on crate feature bytes only.
Source§

impl FromResp2<BytesFrame> for i64

Available on crate feature bytes only.
Source§

impl FromResp2<BytesFrame> for i128

Available on crate feature bytes only.
Source§

impl FromResp2<BytesFrame> for isize

Available on crate feature bytes only.
Source§

impl FromResp2<BytesFrame> for u8

Available on crate feature bytes only.
Source§

impl FromResp2<BytesFrame> for u16

Available on crate feature bytes only.
Source§

impl FromResp2<BytesFrame> for u32

Available on crate feature bytes only.
Source§

impl FromResp2<BytesFrame> for u64

Available on crate feature bytes only.
Source§

impl FromResp2<BytesFrame> for u128

Available on crate feature bytes only.
Source§

impl FromResp2<BytesFrame> for ()

Available on crate feature bytes only.
Source§

impl FromResp2<BytesFrame> for usize

Available on crate feature bytes only.
Source§

impl FromResp2<BytesFrame> for String

Available on crate feature bytes only.
Source§

impl FromResp2<BytesFrame> for Bytes

Available on crate feature bytes only.
Source§

impl FromResp2<BytesFrame> for Str

Available on crate feature bytes only.
Source§

impl FromResp2<OwnedFrame> for bool

Source§

impl FromResp2<OwnedFrame> for f32

Source§

impl FromResp2<OwnedFrame> for f64

Source§

impl FromResp2<OwnedFrame> for i8

Source§

impl FromResp2<OwnedFrame> for i16

Source§

impl FromResp2<OwnedFrame> for i32

Source§

impl FromResp2<OwnedFrame> for i64

Source§

impl FromResp2<OwnedFrame> for i128

Source§

impl FromResp2<OwnedFrame> for isize

Source§

impl FromResp2<OwnedFrame> for u8

Source§

impl FromResp2<OwnedFrame> for u16

Source§

impl FromResp2<OwnedFrame> for u32

Source§

impl FromResp2<OwnedFrame> for u64

Source§

impl FromResp2<OwnedFrame> for u128

Source§

impl FromResp2<OwnedFrame> for ()

Source§

impl FromResp2<OwnedFrame> for usize

Source§

impl FromResp2<OwnedFrame> for String

Source§

impl<K, V, S> FromResp2<BytesFrame> for HashMap<K, V, S>

Available on crate feature bytes only.
Source§

impl<K, V, S> FromResp2<OwnedFrame> for HashMap<K, V, S>

Source§

impl<T> FromResp2<BytesFrame> for Option<T>

Available on crate feature bytes only.
Source§

impl<T> FromResp2<BytesFrame> for Vec<T>

Available on crate feature bytes only.
Source§

impl<T> FromResp2<OwnedFrame> for Option<T>

Source§

impl<T> FromResp2<OwnedFrame> for Vec<T>

Source§

impl<T, const N: usize> FromResp2<BytesFrame> for [T; N]

Available on crate feature bytes only.
Source§

impl<T, const N: usize> FromResp2<OwnedFrame> for [T; N]

Source§

impl<V, S> FromResp2<BytesFrame> for HashSet<V, S>

Available on crate feature bytes only.
Source§

impl<V, S> FromResp2<OwnedFrame> for HashSet<V, S>

Implementors§

Source§

impl FromResp2<BytesFrame> for BytesFrame

Available on crate feature bytes only.
Source§

impl FromResp2<OwnedFrame> for OwnedFrame