Expand description
Abstraction of HELLO command.
For general information about this command, see the Redis documentation.
As this command is executed automatically during connection initialization, there is usually no need for manual execution. Response of HELLO command may be retrieved from Client
§Basic usage
Requires RESP3 protocol usage, panics on RESP2
Response is mapped to HelloResponse.
let mut stack = Stack::default();
let clock = StandardClock::default();
// RESP3 protocol is essential
let mut connection_handler = ConnectionHandler::resp3(SocketAddr::from_str("127.0.0.1:6379").unwrap());
let client = connection_handler.connect(&mut stack, Some(&clock)).unwrap();
let command = HelloCommand{};
let response = client.send(command).unwrap().wait().unwrap();
assert_eq!("redis", response.server);
assert_eq!("master", response.role);
Structs§
- Hello
Command - Abstraction of HELLO command.
- Hello
Response - Mapped response to HELLO command