1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2025-09-25 22:29:45 +00:00

Start to read POST request arguments

This commit is contained in:
2020-05-23 09:37:21 +02:00
parent fcc38afe42
commit 7c18f19674
6 changed files with 175 additions and 32 deletions

View File

@@ -6,6 +6,10 @@ use std::error;
///
/// @author Pierre Hubert
/// Simple result type
pub type ResultExecError<E> = Result<E, ExecError>;
#[derive(Debug, Clone)]
pub struct ExecError(pub String);
@@ -17,6 +21,10 @@ impl ExecError {
pub fn boxed_new(msg: &str) -> Box<ExecError> {
Box::new(ExecError(msg.to_string()))
}
pub fn boxed_string(msg: String) -> Box<ExecError> {
Box::new(ExecError(msg))
}
}
impl fmt::Display for ExecError {