Skip to content

Commit

Permalink
Make Direction a public enum to use with Commands like blmove (#646)
Browse files Browse the repository at this point in the history
Cherry picked for the 0.21.x branch
  • Loading branch information
maospr authored and jaymell committed Sep 4, 2022
1 parent 1b800e3 commit 0e84d73
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/commands.rs
Expand Up @@ -2166,7 +2166,9 @@ impl ToRedisArgs for LposOptions {

/// Enum for the LEFT | RIGHT args used by some commands
pub enum Direction {
/// Targets the first element (head) of the list
Left,
/// Targets the last element (tail) of the list
Right,
}

Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Expand Up @@ -360,7 +360,7 @@ assert_eq!(result, Ok(("foo".to_string(), b"bar".to_vec())));
// public api
pub use crate::client::Client;
pub use crate::cmd::{cmd, pack_command, pipe, Arg, Cmd, Iter};
pub use crate::commands::{Commands, ControlFlow, LposOptions, PubSubCommands};
pub use crate::commands::{Commands, ControlFlow, Direction, LposOptions, PubSubCommands};
pub use crate::connection::{
parse_redis_url, transaction, Connection, ConnectionAddr, ConnectionInfo, ConnectionLike,
IntoConnectionInfo, Msg, PubSub, RedisConnectionInfo,
Expand Down

0 comments on commit 0e84d73

Please sign in to comment.