pub trait ReqGenExt: ReqExt {
// Required method
fn stream_mut(&mut self) -> &mut Stream;
// Provided methods
fn body_raw(&mut self) -> Result<Vec<u8>, HlsError> { ... }
fn body_raw_string(&mut self) -> Result<String, HlsError> { ... }
fn h1_raw_string(&mut self) -> Result<String, HlsError> { ... }
}Required Methods§
fn stream_mut(&mut self) -> &mut Stream
Provided Methods§
fn body_raw(&mut self) -> Result<Vec<u8>, HlsError>
fn body_raw_string(&mut self) -> Result<String, HlsError>
Sourcefn h1_raw_string(&mut self) -> Result<String, HlsError>
fn h1_raw_string(&mut self) -> Result<String, HlsError>
- 最好在调试模式使用,生产模式使用时,一个请求将会产生两次reader,影响效率
- H2严禁使用,否则影响hpack编码
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.