fix: adds TimeLag::new() (#568)

This commit is contained in:
Luke Tchang 2021-11-10 04:38:19 -08:00 committed by GitHub
parent bfdf70cbea
commit 4db37cad84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 0 deletions

View File

@ -37,6 +37,16 @@ pub struct TimeLag<M, const K: u8> {
inner: Arc<M>, inner: Arc<M>,
} }
impl<M, const K: u8> TimeLag<M, K>
where
M: Middleware,
{
/// Instantiates TimeLag provider
pub fn new(inner: M) -> Self {
Self { inner: inner.into() }
}
}
impl<M, const K: u8> TimeLag<M, K> impl<M, const K: u8> TimeLag<M, K>
where where
M: Middleware, M: Middleware,