hermes-runtime-components 0.1.0

Implementation of an IBC Relayer in Rust, as a library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use cgp::prelude::*;

#[derive_component(StreamTypeComponent, ProvideStreamType<Runtime>)]
pub trait HasStreamType: Async {
    type Stream<Item: Async>: Async;
}

#[derive_component(StreamMapperComponent, StreamMapper<Runtime>)]
pub trait CanMapStream: HasStreamType {
    fn map_stream<T, U, M>(stream: Self::Stream<T>, mapper: M) -> Self::Stream<U>
    where
        T: Async,
        U: Async,
        M: Fn(T) -> U + Async;
}