rustdis/commands/
config.rs

1use std::sync::{Arc, Mutex};
2
3use crate::commands::executable::Executable;
4use crate::commands::CommandParser;
5use crate::frame::Frame;
6use crate::store::Store;
7use crate::Error;
8
9#[derive(Debug, PartialEq)]
10pub struct Config;
11
12impl Executable for Config {
13    fn exec(self, _store: Arc<Mutex<Store>>) -> Result<Frame, Error> {
14        Ok(Frame::Simple("OK".to_string()))
15    }
16}
17
18impl TryFrom<&mut CommandParser> for Config {
19    type Error = Error;
20
21    fn try_from(_parser: &mut CommandParser) -> Result<Self, Self::Error> {
22        Ok(Self {})
23    }
24}