mirror of
https://github.com/fluencelabs/fluid
synced 2025-06-18 15:51:20 +00:00
WIP
This commit is contained in:
@ -1,9 +1,7 @@
|
||||
use crate::errors::{err_msg, Error};
|
||||
use crate::errors::{err_msg, AppResult, Error};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json::value::RawValue;
|
||||
|
||||
pub type AppResult<T> = ::std::result::Result<T, Box<Error>>;
|
||||
|
||||
#[derive(Deserialize)]
|
||||
#[serde(tag = "action")]
|
||||
pub enum Request {
|
||||
|
@ -14,3 +14,5 @@ impl fmt::Display for Error {
|
||||
pub fn err_msg(s: &str) -> Box<Error> {
|
||||
Error(s.to_string()).into()
|
||||
}
|
||||
|
||||
pub type AppResult<T> = ::std::result::Result<T, Box<Error>>;
|
||||
|
@ -4,8 +4,8 @@ use serde_json::value::RawValue;
|
||||
use api::Request;
|
||||
use api::Response;
|
||||
|
||||
use crate::api::AppResult;
|
||||
use crate::errors::err_msg;
|
||||
use crate::errors::AppResult;
|
||||
|
||||
pub mod api;
|
||||
pub mod errors;
|
||||
|
@ -1,6 +1,7 @@
|
||||
use crate::api::AppResult;
|
||||
use log;
|
||||
|
||||
use crate::errors::AppResult;
|
||||
|
||||
pub fn create_scheme() -> AppResult<()> {
|
||||
Ok(log::info!("creating scheme"))
|
||||
}
|
||||
|
Reference in New Issue
Block a user