libunftp/server/controlchan/commands/
noop.rs1use crate::{
8 auth::UserDetail,
9 server::controlchan::{
10 Reply, ReplyCode,
11 error::ControlChanError,
12 handler::{CommandContext, CommandHandler},
13 },
14 storage::{Metadata, StorageBackend},
15};
16use async_trait::async_trait;
17
18#[derive(Debug)]
19pub struct Noop;
20
21#[async_trait]
22impl<Storage, User> CommandHandler<Storage, User> for Noop
23where
24 User: UserDetail + 'static,
25 Storage: StorageBackend<User> + 'static,
26 Storage::Metadata: Metadata,
27{
28 #[tracing_attributes::instrument]
29 async fn handle(&self, _args: CommandContext<Storage, User>) -> Result<Reply, ControlChanError> {
30 Ok(Reply::new(ReplyCode::CommandOkay, "Successfully did nothing"))
31 }
32}