use redify::{Push, __private::Pipeline}; use redis::{Client, ConnectionLike, RedisError}; #[derive(Push)] enum Foo { A, B(String), C { bar: String }, } fn main() -> Result<(), RedisError> { let client = Client::open("redis://localhost:6379")?; let mut con = client.get_connection()?; let foo = Foo::B("Hello World".to_owned()); let mut pipe = Pipeline::new(); foo.push::<_, String>("key3", None, &mut pipe); let packed_pipe = pipe.get_packed_pipeline(); con.req_packed_commands(&packed_pipe, 0, 1)?; Ok(()) }