hypershell_components/providers/return.rs
1use core::marker::PhantomData;
2
3use cgp::extra::handler::{Handler, HandlerComponent};
4use cgp::prelude::*;
5
6#[cgp_new_provider]
7impl<Context, Code, Input> Handler<Context, Code, Input> for ReturnInput
8where
9 Context: HasAsyncErrorType,
10 Code: Send,
11 Input: Send,
12{
13 type Output = Input;
14
15 async fn handle(
16 _context: &Context,
17 _tag: PhantomData<Code>,
18 input: Input,
19 ) -> Result<Input, Context::Error> {
20 Ok(input)
21 }
22}