Trait StreamEntry

Source
pub trait StreamEntry:
    Send
    + Sync
    + Serialize
    + for<'de> Deserialize<'de> {
    // Provided methods
    fn from_stream_id(stream_id: &StreamId) -> Result<Self, Error> { ... }
    fn into_xadd_map(&self) -> Result<BTreeMap<String, String>, Error> { ... }
}
Expand description

Extension trait to facilitate Redis Stream serialization/deserialization

Provided Methods§

Source

fn from_stream_id(stream_id: &StreamId) -> Result<Self, Error>

Deserializes from a stringified key value map but only if every field is FromStr. See serde_with::PickFirst<(_, serde_with::DisplayFromStr)>

Source

fn into_xadd_map(&self) -> Result<BTreeMap<String, String>, Error>

Serialize into a stringified field value mapping for XADD

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.

Implementors§