Skip to main content

http_type/
lib.rs

1//! http-type
2//!
3//! A comprehensive Rust type library for HTTP operations and concurrent programming.
4
5mod any;
6mod arc_mutex;
7mod arc_rwlock;
8mod attribute;
9mod box_leak;
10mod box_rwlock;
11mod content_type;
12mod cookie;
13mod file_extension;
14mod hash_map_xx_hash3_64;
15mod hash_set_xx_hash3_64;
16mod http_status;
17mod http_url;
18mod http_version;
19mod lifetime;
20mod methods;
21mod panic;
22mod protocol;
23mod rc_rwlock;
24mod request;
25mod response;
26mod status;
27mod stream;
28mod task;
29mod upgrade_type;
30mod websocket_frame;
31
32pub use {
33    any::*, arc_mutex::*, arc_rwlock::*, attribute::*, box_leak::*, box_rwlock::*, content_type::*,
34    cookie::*, file_extension::*, hash_map_xx_hash3_64::*, hash_set_xx_hash3_64::*, http_status::*,
35    http_url::*, http_version::*, lifetime::*, methods::*, panic::*, protocol::*, rc_rwlock::*,
36    request::*, response::*, status::*, stream::*, task::*, upgrade_type::*, websocket_frame::*,
37};
38
39pub use {http_compress::*, http_constant::*, serde_json, tokio};
40
41use std::{
42    any::Any,
43    cell::{RefCell, RefMut},
44    collections::{HashMap, HashSet, VecDeque},
45    error::Error,
46    fmt::{self, Debug, Display, Formatter, Write},
47    hash::Hash,
48    io::{self, ErrorKind},
49    mem,
50    net::IpAddr,
51    num::ParseIntError,
52    pin::Pin,
53    rc::Rc,
54    result::Result,
55    str::{FromStr, SplitWhitespace, from_utf8},
56    sync::{
57        Arc,
58        atomic::{self, AtomicBool, AtomicUsize},
59    },
60    task::{Context, Poll},
61    thread_local,
62    time::Duration,
63};
64
65use {
66    core::hash::BuildHasherDefault,
67    lombok_macros::*,
68    serde::{Deserialize, Serialize, de::DeserializeOwned},
69    tokio::{
70        io::{AsyncBufRead, AsyncBufReadExt, AsyncRead, AsyncReadExt, AsyncWriteExt, ReadBuf},
71        net::TcpStream,
72        runtime::Handle,
73        sync::{
74            Mutex, Notify, RwLock, RwLockReadGuard, RwLockWriteGuard,
75            mpsc::{UnboundedReceiver, UnboundedSender, unbounded_channel},
76        },
77        task::{JoinError, LocalSet, spawn_blocking, spawn_local},
78        time::{error::Elapsed, timeout},
79    },
80    url::{ParseError, Url},
81};