1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-09-02 01:31:57 +02:00

work on resource_path api

This commit is contained in:
Nikolay Kim
2017-12-05 13:31:06 -08:00
parent 3de43c2a46
commit d8b880e167
6 changed files with 82 additions and 35 deletions

View File

@@ -403,6 +403,15 @@ impl ResponseError for UriSegmentError {
}
}
/// Errors which can occur when attempting to generate resource uri.
#[derive(Fail, Debug, PartialEq)]
pub enum UriGenerationError {
#[fail(display="Resource not found")]
ResourceNotFound,
#[fail(display="Not all path pattern covered")]
NotEnoughElements,
}
#[cfg(test)]
mod tests {
use std::error::Error as StdError;