Expand description

Abstraction of BGSAVE command.

For general information about this command, see the Redis documentation.

§Basic usage

By default no SCHEDULE option is used.

let mut stack = Stack::default();
let clock = StandardClock::default();

let mut connection_handler = ConnectionHandler::resp2(SocketAddr::from_str("127.0.0.1:6379").unwrap());
let client = connection_handler.connect(&mut stack, Some(&clock)).unwrap();

let command = BackgroundSaveCommand::default();
let response = client.send(command).unwrap().wait().unwrap();

§Schedule option

Using SCHEDULE option by setting constructor flag to true.

let command = BackgroundSaveCommand::new(true);

§Shorthand

Client provides a shorthand method for this command.

let response = client.bgsave(false).unwrap().wait().unwrap();

Structs§