Skip to main content

fr_rust/
lib.rs

1// Module Declarations
2pub mod crypto;
3pub mod db;
4pub mod ddos;
5pub mod email;
6pub mod jwt;
7pub mod linkv;
8pub mod otp;
9pub mod redis;
10pub mod server;
11pub mod types;
12pub mod ws;
13pub mod macros;
14pub mod req;
15pub mod res;
16
17// The Framework Prelude
18pub mod prelude {
19    // Internal Library Re-exports
20    pub use crate::crypto::{self, CryptoService, CryptoError};
21    pub use crate::db::{self, DbPool, DbError};
22    pub use crate::ddos::{self, DdosConfig, DdosShield};
23    pub use crate::email::{self, EmailConfig, EmailData, EmailService};
24    pub use crate::jwt::{self, JwtService};
25    pub use crate::linkv::{self, LinkV, LinkVConfig};
26    pub use crate::otp::{self, OtpConfig, OtpService};
27    pub use crate::redis::{self, RedisManager, RedisManagerError};
28    pub use crate::server::{self, env, env_or_default, load_env};
29    pub use crate::types::{self, Main, Http, ResError};
30    pub use crate::ws::{self, UserMsg, WsConfig, WsManager, MsgBatcher};
31    pub use crate::{
32        err, route, routes, get, post, put, delete, patch, scope, resource, run
33    };
34    pub use crate::res::{
35          self,
36          http_ok_static,
37          http_ok_stream,
38          http_no_content,
39          http_created,
40          http_accepted,
41          http_partial_content,
42          http_bad_static,
43          http_unauthorized,
44          http_forbidden,
45          http_not_found,
46          http_method_not_allowed,
47          http_unsupported_media,
48          http_too_many_requests,
49          http_service_unavailable,
50          http_server_error,
51          send_file_fast,
52          stream_file_chunked,
53          send_file_range,
54          http_brotli,
55          http_lz4,
56          parse_multipart_stream,
57          parse_json_fast,
58          parse_range,
59          upload_with_progress,
60          upload_streaming
61    };
62    pub use actix_web::main as web_main;
63    pub use actix_web::web::ServiceConfig as Config;
64}