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 HasUrlType {
    type Url;
}

#[cgp_component {
    provider: UrlArgExtractor,
    derive_delegate: UseDelegate<Arg>,
}]
pub trait CanExtractUrlArg<Arg>: HasUrlType + HasErrorType {
    fn extract_url_arg(&self, _phantom: PhantomData<Arg>) -> Result<Self::Url, Self::Error>;
}