Skip to main content

impulse_utils/
prelude.rs

1//! Fast access to nice things.
2
3#[cfg(feature = "salvo")]
4#[cfg(not(any(target_arch = "wasm32", target_arch = "wasm64")))]
5pub use crate::requests::{MsgPackParser, SimdJsonParser};
6
7#[cfg(all(feature = "reqwest", feature = "cresult"))]
8pub use crate::requests::MsgPackRequest;
9
10#[cfg(feature = "mresult")]
11pub use crate::results::MResult;
12
13#[cfg(feature = "cresult")]
14pub use crate::results::CResult;
15
16#[cfg(feature = "salvo")]
17#[cfg(not(any(target_arch = "wasm32", target_arch = "wasm64")))]
18pub use crate::responses::{File, Html, Json, MsgPack, OK, Plain};
19
20#[cfg(feature = "salvo")]
21#[cfg(not(any(target_arch = "wasm32", target_arch = "wasm64")))]
22pub use crate::{file_upload, html, json, msgpack, ok, plain};
23
24#[cfg(all(feature = "reqwest", feature = "cresult"))]
25pub use crate::responses::MsgPackResponse;
26
27#[cfg(all(feature = "reqwest", feature = "cresult"))]
28pub use crate::responses::CollectServerError;
29
30#[cfg(all(feature = "reqwest", feature = "mresult"))]
31pub use crate::responses::RedirectServerError;
32
33#[cfg(feature = "mresult")]
34pub use crate::errors::ServerError;
35
36#[cfg(feature = "cresult")]
37pub use crate::errors::ClientError;
38
39pub use crate::errors::ErrorResponse;
40
41#[cfg(feature = "salvo")]
42#[cfg(not(any(target_arch = "wasm32", target_arch = "wasm64")))]
43pub use salvo::oapi::endpoint;
44
45#[cfg(feature = "salvo")]
46#[cfg(not(any(target_arch = "wasm32", target_arch = "wasm64")))]
47pub use salvo::http::StatusCode;