rsiot/components/cmp_http_server/mod.rs
1//! Компонент для получения данных через HTTP server.
2//!
3//! Ссылки:
4//!
5//! - [Документация docs.rs](https://docs.rs/rsiot-http-server/latest/)
6//!
7//! - [Репозиторий GitHub](https://github.com/Konstantin-Dudersky/rsiot/tree/main/rsiot-http-server)
8//!
9//! - [Примеры](https://github.com/Konstantin-Dudersky/rsiot/tree/main/rsiot-http-server/examples)
10//!
11//!
12//! Данные возвращаются в виде структур Json. Для более удобного просмотра можно использовать
13//! расширения к браузеру, например [JSON Beautifier & Editor](https://chromewebstore.google.com/detail/json-beautifier-editor/lpopeocbeepakdnipejhlpcmifheolpl)
14//!
15//!
16//!
17//! ## Пример
18//!
19//! ```rust
20#![doc = include_str!("../../../examples/cmp_http_server_and_client/cmp_http_server.rs")]
21//! ```
22//!
23//! ## Тестирование
24//!
25//! См. папку .bruno
26//!
27
28mod component;
29mod config;
30mod error;
31mod fn_process;
32mod routes;
33mod shared_state;
34mod tasks;
35
36pub use crate::components_config::http_server::{
37 GetEndpoint, GetEndpointConfig, GetEndpointsCollection, PutEndpoint, PutEndpointConfig,
38 PutEndpointsCollection,
39};
40pub use component::Cmp;
41pub use config::Config;
42pub use error::Error;
43
44type Result<T> = std::result::Result<T, Error>;