Skip to content

Commit 0e84d73

Browse files
maosprjaymell
authored andcommitted
Make Direction a public enum to use with Commands like blmove (redis-rs#646)
Cherry picked for the 0.21.x branch
1 parent 1b800e3 commit 0e84d73

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/commands.rs

+2
Original file line numberDiff line numberDiff line change
@@ -2166,7 +2166,9 @@ impl ToRedisArgs for LposOptions {
21662166

21672167
/// Enum for the LEFT | RIGHT args used by some commands
21682168
pub enum Direction {
2169+
/// Targets the first element (head) of the list
21692170
Left,
2171+
/// Targets the last element (tail) of the list
21702172
Right,
21712173
}
21722174

src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ assert_eq!(result, Ok(("foo".to_string(), b"bar".to_vec())));
360360
// public api
361361
pub use crate::client::Client;
362362
pub use crate::cmd::{cmd, pack_command, pipe, Arg, Cmd, Iter};
363-
pub use crate::commands::{Commands, ControlFlow, LposOptions, PubSubCommands};
363+
pub use crate::commands::{Commands, ControlFlow, Direction, LposOptions, PubSubCommands};
364364
pub use crate::connection::{
365365
parse_redis_url, transaction, Connection, ConnectionAddr, ConnectionInfo, ConnectionLike,
366366
IntoConnectionInfo, Msg, PubSub, RedisConnectionInfo,

0 commit comments

Comments
 (0)