Add first Server Sent Events API endpoint (#1107)

* Add Server Sent Events API endpoint

* Support both event handlers as a transitory measure

* Fix merge conflicts
This commit is contained in:
Adam Szkoda
2020-06-06 08:39:11 +02:00
committed by GitHub
parent 036096ef61
commit e20a2deebd
11 changed files with 244 additions and 24 deletions

View File

@@ -71,6 +71,12 @@ impl From<hyper::error::Error> for ApiError {
}
}
impl From<std::io::Error> for ApiError {
fn from(e: std::io::Error) -> ApiError {
ApiError::ServerError(format!("IO error: {:?}", e))
}
}
impl StdError for ApiError {
fn cause(&self) -> Option<&dyn StdError> {
None