Crates.io | e114_core |
lib.rs | e114_core |
version | 0.3.0 |
source | src |
created_at | 2020-07-07 13:25:41.501307 |
updated_at | 2021-10-09 16:51:47.461226 |
description | A convenient wrapper around several rust web frameworks to isolate business logic from protocol handling. |
homepage | |
repository | https://github.com/element114/e114_core |
max_upload_size | |
id | 262277 |
size | 28,940 |
It provides the WebResult
type to be returned by business logic functions.
It provides standardized error structs based on JSONAPI#Error
format.
It also contains the web framework connectors (feature gated), because in rust either the type or the trait should be in your crate in order to be able to implement it.
This crate is:
#![forbid(unsafe_code)]
#![warn(clippy::pedantic)]
https://jsonapi.org/format/#errors
e114_core = { version = "0.3.0", features = ["jsonschema"] }
Adds #[derive(JsonSchema)]
to certain types and the schemars
dependency.
e114_core = { version = "0.3.0", features = ["actix_web"] }
Adds actix-web
From
impl for WebResult
and the actix-web
dependency.
e114_core = { version = "0.3.0", features = ["hyper_body"] }
Adds http::Response<hyper::Body>
impl for WebResult
and the hyper
dependency.
This is intended to be used by warp
and other frameworks which are built on http
and hyper
.
1.50.0