chiark / gitweb /
own http body type
[hippotat.git] / src / prelude.rs
index 5e4261d0407c5e88f405f96006a88122b5f440de..c7c53e15012320cbfb205c650daf56995a4eff98 100644 (file)
@@ -4,16 +4,18 @@
 
 pub use std::array;
 pub use std::collections::{BTreeSet, HashMap, VecDeque};
-pub use std::convert::{TryFrom, TryInto};
+pub use std::convert::{Infallible, TryFrom, TryInto};
 pub use std::borrow::Cow;
+pub use std::cell::{RefCell, RefMut};
 pub use std::cmp::{min, max};
+pub use std::env;
 pub use std::fs;
 pub use std::fmt::{self, Debug, Display, Write as _};
 pub use std::future::Future;
 pub use std::io::{self, Cursor, ErrorKind, Read as _, Write as _};
 pub use std::iter;
 pub use std::mem;
-pub use std::net::{IpAddr, Ipv4Addr, Ipv6Addr};
+pub use std::net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr};
 pub use std::path::{Path, PathBuf};
 pub use std::panic;
 pub use std::process;
@@ -26,20 +28,25 @@ pub use std::time::{SystemTime, UNIX_EPOCH};
 pub use cervine::Cow as Cervine;
 pub use extend::ext;
 pub use fehler::{throw, throws};
-pub use futures::{poll, future, StreamExt as _};
-pub use hyper::body::{Bytes, Buf as _};
-pub use hyper::Uri;
+pub use futures::{poll, future, FutureExt, StreamExt, TryStreamExt};
+pub use hyper::body::{Bytes, Buf, HttpBody};
+pub use hyper::{Method, Uri};
 pub use hyper_tls::HttpsConnector;
 pub use ipnet::IpNet;
-pub use itertools::{iproduct, Itertools};
+pub use itertools::{iproduct, izip, Itertools};
 pub use lazy_regex::{regex_captures, regex_is_match, regex_replace_all};
+pub use lazy_static::lazy_static;
 pub use log::{trace, debug, info, warn, error};
+pub use memchr::memmem;
+pub use pin_project_lite::pin_project;
 pub use structopt::StructOpt;
+pub use subtle::ConstantTimeEq;
 pub use thiserror::Error;
 pub use tokio::io::{AsyncBufReadExt, AsyncWriteExt};
 pub use tokio::pin;
 pub use tokio::select;
-pub use tokio::task;
+pub use tokio::sync::{mpsc, oneshot};
+pub use tokio::task::{self, JoinHandle};
 pub use tokio::time::{Duration, Instant};
 pub use void::{self, Void, ResultVoidExt, ResultVoidErrExt};
 
@@ -50,16 +57,20 @@ pub use eyre::Error as AE;
 
 pub use crate::config::{self, InstanceConfig, u32Ext as _};
 pub use crate::ini;
+pub use crate::ipif::Ipif;
+pub use crate::multipart::{self, PartName, MetadataFieldIterator};
 pub use crate::utils::*;
 pub use crate::queue::*;
 pub use crate::reporter::*;
 pub use crate::types::*;
-pub use crate::slip::*;
+pub use crate::slip::{self, *};
 
 pub type ReqNum = u64;
 
 pub use ErrorKind as EK;
 pub use PacketError as PE;
+pub use tokio::io as t_io;
+pub use tokio::process as t_proc;
 
 pub const SLIP_END:     u8 = 0o300; // c0
 pub const SLIP_ESC:     u8 = 0o333; // db
@@ -67,6 +78,8 @@ pub const SLIP_ESC_END: u8 = 0o334; // dc
 pub const SLIP_ESC_ESC: u8 = 0o335; // dd
 pub const SLIP_MIME_ESC: u8 = b'-'; // 2d
 
+pub const MAX_OVERHEAD: usize = 2_000;
+
 pub use base64::STANDARD as BASE64_CONFIG;
 
 pub fn default<T:Default>() -> T { Default::default() }