lum_boxtypes 0.2.0

lum framework's box types library
Documentation
1
2
3
4
5
6
7
8
9
10
use std::{error::Error, future::Future, pin::Pin};

pub type BoxedError = Box<dyn Error + Send + Sync>;

pub type PinnedBoxedFuture<T> = Pin<Box<dyn Future<Output = T> + Send + Sync>>;
pub type PinnedBoxedFutureResult<T> = PinnedBoxedFuture<Result<T, BoxedError>>;

pub type LifetimedPinnedBoxedFuture<'a, T> = Pin<Box<dyn Future<Output = T> + Send + Sync + 'a>>;
pub type LifetimedPinnedBoxedFutureResult<'a, T> =
    LifetimedPinnedBoxedFuture<'a, Result<T, BoxedError>>;