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§
Sourcefn from_frame(frame: F) -> Result<Self, RedisProtocolError>
fn from_frame(frame: F) -> Result<Self, RedisProtocolError>
Convert a frame to the destination type.
Provided Methods§
Sourcefn from_frames(frames: Vec<F>) -> Result<Vec<Self>, RedisProtocolError>
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.
impl FromResp2<BytesFrame> for bool
Available on crate feature
bytes
only.fn from_frame(frame: BytesFrame) -> Result<Self, RedisProtocolError>
Source§impl FromResp2<BytesFrame> for f32
Available on crate feature bytes
only.
impl FromResp2<BytesFrame> for f32
Available on crate feature
bytes
only.fn from_frame(frame: BytesFrame) -> Result<Self, RedisProtocolError>
Source§impl FromResp2<BytesFrame> for f64
Available on crate feature bytes
only.
impl FromResp2<BytesFrame> for f64
Available on crate feature
bytes
only.fn from_frame(frame: BytesFrame) -> Result<Self, RedisProtocolError>
Source§impl FromResp2<BytesFrame> for i8
Available on crate feature bytes
only.
impl FromResp2<BytesFrame> for i8
Available on crate feature
bytes
only.fn from_frame(value: BytesFrame) -> Result<i8, RedisProtocolError>
Source§impl FromResp2<BytesFrame> for i16
Available on crate feature bytes
only.
impl FromResp2<BytesFrame> for i16
Available on crate feature
bytes
only.fn from_frame(value: BytesFrame) -> Result<i16, RedisProtocolError>
Source§impl FromResp2<BytesFrame> for i32
Available on crate feature bytes
only.
impl FromResp2<BytesFrame> for i32
Available on crate feature
bytes
only.fn from_frame(value: BytesFrame) -> Result<i32, RedisProtocolError>
Source§impl FromResp2<BytesFrame> for i64
Available on crate feature bytes
only.
impl FromResp2<BytesFrame> for i64
Available on crate feature
bytes
only.fn from_frame(value: BytesFrame) -> Result<i64, RedisProtocolError>
Source§impl FromResp2<BytesFrame> for i128
Available on crate feature bytes
only.
impl FromResp2<BytesFrame> for i128
Available on crate feature
bytes
only.fn from_frame(value: BytesFrame) -> Result<i128, RedisProtocolError>
Source§impl FromResp2<BytesFrame> for isize
Available on crate feature bytes
only.
impl FromResp2<BytesFrame> for isize
Available on crate feature
bytes
only.fn from_frame(value: BytesFrame) -> Result<isize, RedisProtocolError>
Source§impl FromResp2<BytesFrame> for u8
Available on crate feature bytes
only.
impl FromResp2<BytesFrame> for u8
Available on crate feature
bytes
only.fn from_frame(frame: BytesFrame) -> Result<Self, RedisProtocolError>
Source§impl FromResp2<BytesFrame> for u16
Available on crate feature bytes
only.
impl FromResp2<BytesFrame> for u16
Available on crate feature
bytes
only.fn from_frame(value: BytesFrame) -> Result<u16, RedisProtocolError>
Source§impl FromResp2<BytesFrame> for u32
Available on crate feature bytes
only.
impl FromResp2<BytesFrame> for u32
Available on crate feature
bytes
only.fn from_frame(value: BytesFrame) -> Result<u32, RedisProtocolError>
Source§impl FromResp2<BytesFrame> for u64
Available on crate feature bytes
only.
impl FromResp2<BytesFrame> for u64
Available on crate feature
bytes
only.fn from_frame(value: BytesFrame) -> Result<u64, RedisProtocolError>
Source§impl FromResp2<BytesFrame> for u128
Available on crate feature bytes
only.
impl FromResp2<BytesFrame> for u128
Available on crate feature
bytes
only.fn from_frame(value: BytesFrame) -> Result<u128, RedisProtocolError>
Source§impl FromResp2<BytesFrame> for ()
Available on crate feature bytes
only.
impl FromResp2<BytesFrame> for ()
Available on crate feature
bytes
only.fn from_frame(_: BytesFrame) -> Result<Self, RedisProtocolError>
Source§impl FromResp2<BytesFrame> for usize
Available on crate feature bytes
only.
impl FromResp2<BytesFrame> for usize
Available on crate feature
bytes
only.fn from_frame(value: BytesFrame) -> Result<usize, RedisProtocolError>
Source§impl FromResp2<BytesFrame> for String
Available on crate feature bytes
only.
impl FromResp2<BytesFrame> for String
Available on crate feature
bytes
only.fn from_frame(frame: BytesFrame) -> Result<Self, RedisProtocolError>
Source§impl FromResp2<BytesFrame> for Bytes
Available on crate feature bytes
only.
impl FromResp2<BytesFrame> for Bytes
Available on crate feature
bytes
only.fn from_frame(frame: BytesFrame) -> Result<Self, RedisProtocolError>
Source§impl FromResp2<BytesFrame> for Str
Available on crate feature bytes
only.
impl FromResp2<BytesFrame> for Str
Available on crate feature
bytes
only.fn from_frame(frame: BytesFrame) -> Result<Self, RedisProtocolError>
Source§impl FromResp2<OwnedFrame> for bool
impl FromResp2<OwnedFrame> for bool
fn from_frame(frame: OwnedFrame) -> Result<Self, RedisProtocolError>
Source§impl FromResp2<OwnedFrame> for f32
impl FromResp2<OwnedFrame> for f32
fn from_frame(frame: OwnedFrame) -> Result<Self, RedisProtocolError>
Source§impl FromResp2<OwnedFrame> for f64
impl FromResp2<OwnedFrame> for f64
fn from_frame(frame: OwnedFrame) -> Result<Self, RedisProtocolError>
Source§impl FromResp2<OwnedFrame> for i8
impl FromResp2<OwnedFrame> for i8
fn from_frame(value: OwnedFrame) -> Result<i8, RedisProtocolError>
Source§impl FromResp2<OwnedFrame> for i16
impl FromResp2<OwnedFrame> for i16
fn from_frame(value: OwnedFrame) -> Result<i16, RedisProtocolError>
Source§impl FromResp2<OwnedFrame> for i32
impl FromResp2<OwnedFrame> for i32
fn from_frame(value: OwnedFrame) -> Result<i32, RedisProtocolError>
Source§impl FromResp2<OwnedFrame> for i64
impl FromResp2<OwnedFrame> for i64
fn from_frame(value: OwnedFrame) -> Result<i64, RedisProtocolError>
Source§impl FromResp2<OwnedFrame> for i128
impl FromResp2<OwnedFrame> for i128
fn from_frame(value: OwnedFrame) -> Result<i128, RedisProtocolError>
Source§impl FromResp2<OwnedFrame> for isize
impl FromResp2<OwnedFrame> for isize
fn from_frame(value: OwnedFrame) -> Result<isize, RedisProtocolError>
Source§impl FromResp2<OwnedFrame> for u8
impl FromResp2<OwnedFrame> for u8
fn from_frame(frame: OwnedFrame) -> Result<Self, RedisProtocolError>
Source§impl FromResp2<OwnedFrame> for u16
impl FromResp2<OwnedFrame> for u16
fn from_frame(value: OwnedFrame) -> Result<u16, RedisProtocolError>
Source§impl FromResp2<OwnedFrame> for u32
impl FromResp2<OwnedFrame> for u32
fn from_frame(value: OwnedFrame) -> Result<u32, RedisProtocolError>
Source§impl FromResp2<OwnedFrame> for u64
impl FromResp2<OwnedFrame> for u64
fn from_frame(value: OwnedFrame) -> Result<u64, RedisProtocolError>
Source§impl FromResp2<OwnedFrame> for u128
impl FromResp2<OwnedFrame> for u128
fn from_frame(value: OwnedFrame) -> Result<u128, RedisProtocolError>
Source§impl FromResp2<OwnedFrame> for ()
impl FromResp2<OwnedFrame> for ()
fn from_frame(_: OwnedFrame) -> Result<Self, RedisProtocolError>
Source§impl FromResp2<OwnedFrame> for usize
impl FromResp2<OwnedFrame> for usize
fn from_frame(value: OwnedFrame) -> Result<usize, RedisProtocolError>
Source§impl FromResp2<OwnedFrame> for String
impl FromResp2<OwnedFrame> for String
fn from_frame(frame: OwnedFrame) -> Result<Self, RedisProtocolError>
Source§impl<K, V, S> FromResp2<BytesFrame> for HashMap<K, V, S>
Available on crate feature bytes
only.
impl<K, V, S> FromResp2<BytesFrame> for HashMap<K, V, S>
Available on crate feature
bytes
only.fn from_frame(frame: BytesFrame) -> Result<Self, RedisProtocolError>
Source§impl<K, V, S> FromResp2<OwnedFrame> for HashMap<K, V, S>
impl<K, V, S> FromResp2<OwnedFrame> for HashMap<K, V, S>
fn from_frame(frame: OwnedFrame) -> Result<Self, RedisProtocolError>
Source§impl<T> FromResp2<BytesFrame> for Option<T>where
T: FromResp2<BytesFrame>,
Available on crate feature bytes
only.
impl<T> FromResp2<BytesFrame> for Option<T>where
T: FromResp2<BytesFrame>,
Available on crate feature
bytes
only.fn from_frame(frame: BytesFrame) -> Result<Option<T>, RedisProtocolError>
Source§impl<T> FromResp2<BytesFrame> for Vec<T>where
T: FromResp2<BytesFrame>,
Available on crate feature bytes
only.
impl<T> FromResp2<BytesFrame> for Vec<T>where
T: FromResp2<BytesFrame>,
Available on crate feature
bytes
only.fn from_frame(frame: BytesFrame) -> Result<Vec<T>, RedisProtocolError>
Source§impl<T> FromResp2<OwnedFrame> for Option<T>where
T: FromResp2<OwnedFrame>,
impl<T> FromResp2<OwnedFrame> for Option<T>where
T: FromResp2<OwnedFrame>,
fn from_frame(frame: OwnedFrame) -> Result<Option<T>, RedisProtocolError>
Source§impl<T> FromResp2<OwnedFrame> for Vec<T>where
T: FromResp2<OwnedFrame>,
impl<T> FromResp2<OwnedFrame> for Vec<T>where
T: FromResp2<OwnedFrame>,
fn from_frame(frame: OwnedFrame) -> Result<Vec<T>, RedisProtocolError>
Source§impl<T, const N: usize> FromResp2<BytesFrame> for [T; N]where
T: FromResp2<BytesFrame>,
Available on crate feature bytes
only.
impl<T, const N: usize> FromResp2<BytesFrame> for [T; N]where
T: FromResp2<BytesFrame>,
Available on crate feature
bytes
only.fn from_frame(value: BytesFrame) -> Result<[T; N], RedisProtocolError>
Source§impl<T, const N: usize> FromResp2<OwnedFrame> for [T; N]where
T: FromResp2<OwnedFrame>,
impl<T, const N: usize> FromResp2<OwnedFrame> for [T; N]where
T: FromResp2<OwnedFrame>,
fn from_frame(value: OwnedFrame) -> Result<[T; N], RedisProtocolError>
Source§impl<V, S> FromResp2<BytesFrame> for HashSet<V, S>
Available on crate feature bytes
only.
impl<V, S> FromResp2<BytesFrame> for HashSet<V, S>
Available on crate feature
bytes
only.fn from_frame(frame: BytesFrame) -> Result<Self, RedisProtocolError>
Source§impl<V, S> FromResp2<OwnedFrame> for HashSet<V, S>
impl<V, S> FromResp2<OwnedFrame> for HashSet<V, S>
fn from_frame(frame: OwnedFrame) -> Result<Self, RedisProtocolError>
Implementors§
impl FromResp2<BytesFrame> for BytesFrame
Available on crate feature
bytes
only.