-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fe9100b
commit 3581ab5
Showing
4 changed files
with
23 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,22 @@ | ||
use cgp_async::Async; | ||
|
||
use crate::traits::HasErrorType; | ||
use crate::{CanRaiseError, CanWrapError}; | ||
|
||
pub trait HasAsyncErrorType: Async + HasErrorType<Error: Async> {} | ||
|
||
impl<Context> HasAsyncErrorType for Context where Context: Async + HasErrorType<Error: Async> {} | ||
|
||
pub trait CanRaiseAsyncError<SourceError>: HasAsyncErrorType + CanRaiseError<SourceError> {} | ||
|
||
impl<Context, SourceError> CanRaiseAsyncError<SourceError> for Context where | ||
Context: HasAsyncErrorType + CanRaiseError<SourceError> | ||
{ | ||
} | ||
|
||
pub trait CanWrapAsyncError<SourceError>: HasAsyncErrorType + CanWrapError<SourceError> {} | ||
|
||
impl<Context, SourceError> CanWrapAsyncError<SourceError> for Context where | ||
Context: HasAsyncErrorType + CanWrapError<SourceError> | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters