hypershell-components 0.1.0

Modular DSL for shellscripting in Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use core::marker::PhantomData;

use cgp::core::component::UseDelegate;
use cgp::prelude::*;

#[cgp_type]
pub trait HasHttpMethodType {
    type HttpMethod;
}

#[cgp_component {
    provider: MethodArgExtractor,
    derive_delegate: UseDelegate<Arg>,
}]
pub trait CanExtractMethodArg<Arg>: HasHttpMethodType {
    fn extract_method_arg(&self, _phantom: PhantomData<Arg>) -> Self::HttpMethod;
}