/ohos5.0/commonlibrary/rust/ylong_http/ylong_http/src/ |
H A D | error.rs | 35 pub struct HttpError { struct 39 impl From<ErrorKind> for HttpError { implementation 45 impl From<InvalidUri> for HttpError { implementation 52 impl From<H2Error> for HttpError { implementation 58 impl From<Infallible> for HttpError { implementation 64 impl Display for HttpError { implementation 70 impl Error for HttpError {} implementation
|
H A D | headers.rs | 210 pub fn from_bytes(bytes: &[u8]) -> Result<Self, HttpError> { in from_bytes() argument 237 fn normalize(input: &[u8]) -> Result<String, HttpError> { in normalize() argument 327 pub fn from_bytes(bytes: &[u8]) -> Result<Self, HttpError> { in from_bytes() argument 368 pub fn append_bytes(&mut self, bytes: &[u8]) -> Result<(), HttpError> { in append_bytes() argument 392 pub fn to_string(&self) -> Result<String, HttpError> { in to_string() argument 732 <HeaderName as TryFrom<N>>::Error: Into<HttpError>, in insert() 734 <HeaderValue as TryFrom<V>>::Error: Into<HttpError>, in insert() 769 <HeaderName as TryFrom<N>>::Error: Into<HttpError>, in append() 771 <HeaderValue as TryFrom<V>>::Error: Into<HttpError>, in append()
|
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http/src/h1/response/ |
H A D | decoder.rs | 215 ) -> Result<Option<(ResponsePart, &'a [u8])>, HttpError> { in decode() argument 230 ) -> Result<Option<(ResponsePart, &'a [u8])>, HttpError> { in version_phase() argument 257 ) -> Result<Option<(ResponsePart, &'a [u8])>, HttpError> { in status_code_phase() argument 278 ) -> Result<Option<(ResponsePart, &'a [u8])>, HttpError> { in reason_phase() argument 385 ) -> Result<Option<&'a [u8]>, HttpError> { in decode_header_from_value() argument 399 ) -> Result<Option<&'a [u8]>, HttpError> { in decode_header_from_key() argument 413 ) -> Result<Option<&'a [u8]>, HttpError> { in decode_header_from_ows_before() argument 427 ) -> Result<Option<&'a [u8]>, HttpError> { in decode_header_from_crlf() argument 441 ) -> Result<Option<&'a [u8]>, HttpError> { in decode_header_from_crlf_end() argument 519 ) -> Result<Option<&'a [u8]>, HttpError> { in decode_crlf() argument [all …]
|
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http/src/request/ |
H A D | mod.rs | 110 <Uri as TryFrom<T>>::Error: Into<HttpError>, in get() 128 <Uri as TryFrom<T>>::Error: Into<HttpError>, in head() 146 <Uri as TryFrom<T>>::Error: Into<HttpError>, in post() 163 <Uri as TryFrom<T>>::Error: Into<HttpError>, in put() 181 <Uri as TryFrom<T>>::Error: Into<HttpError>, in delete() 199 <Uri as TryFrom<T>>::Error: Into<HttpError>, in connect() 217 <Uri as TryFrom<T>>::Error: Into<HttpError>, in options() 525 <Method as TryFrom<T>>::Error: Into<HttpError>, in method() 547 <Uri as TryFrom<T>>::Error: Into<HttpError>, in url() 568 <Version as TryFrom<T>>::Error: Into<HttpError>, in version() [all …]
|
H A D | method.rs | 115 pub fn from_bytes(bytes: &[u8]) -> Result<Method, HttpError> { in from_bytes() argument
|
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http/src/body/mime/common/ |
H A D | multi.rs | 158 <HeaderName as TryFrom<N>>::Error: Into<HttpError>, in insert_header() 160 <HeaderValue as TryFrom<V>>::Error: Into<HttpError>, in insert_header() 173 <HeaderName as TryFrom<N>>::Error: Into<HttpError>, in append_header() 175 <HeaderValue as TryFrom<V>>::Error: Into<HttpError>, in append_header() 189 ) -> Result<&mut Headers, HttpError> { in set_content_type() argument 391 <HeaderName as TryFrom<N>>::Error: Into<HttpError>, in insert_header() 393 <HeaderValue as TryFrom<V>>::Error: Into<HttpError>, in insert_header() 416 <HeaderName as TryFrom<N>>::Error: Into<HttpError>, in append_header() 418 <HeaderValue as TryFrom<V>>::Error: Into<HttpError>, in append_header() 537 pub fn build(self) -> Result<MimeMulti<'a>, HttpError> { in build() argument
|
H A D | part.rs | 82 <HeaderName as TryFrom<N>>::Error: Into<HttpError>, in header() 84 <HeaderValue as TryFrom<V>>::Error: Into<HttpError>, in header() 97 <HeaderName as TryFrom<N>>::Error: Into<HttpError>, in append_header() 99 <HeaderValue as TryFrom<V>>::Error: Into<HttpError>, in append_header() 283 <HeaderName as TryFrom<N>>::Error: Into<HttpError>, in header() 285 <HeaderValue as TryFrom<V>>::Error: Into<HttpError>, in header() 308 <HeaderName as TryFrom<N>>::Error: Into<HttpError>, in append_header() 310 <HeaderValue as TryFrom<V>>::Error: Into<HttpError>, in append_header() 398 pub fn build(self) -> Result<MimePart<'a>, HttpError> { in build() argument
|
H A D | headers.rs | 161 ) -> Result<(TokenStatus<Headers, ()>, &'a [u8]), HttpError> { in decode() argument 189 fn start_decode<'a>(&mut self, buf: &'a [u8]) -> Result<&'a [u8], HttpError> { in start_decode() argument 231 fn crlf_decode<'a>(&mut self, buf: &'a [u8]) -> Result<&'a [u8], HttpError> { in crlf_decode() argument 242 fn name_decode<'a>(&mut self, buf: &'a [u8]) -> Result<&'a [u8], HttpError> { in name_decode() argument 264 fn value_decode<'a>(&mut self, buf: &'a [u8]) -> Result<&'a [u8], HttpError> { in value_decode() argument
|
H A D | mod.rs | 125 ) -> Result<TokenStatus<&[u8], usize>, HttpError> { in consume_crlf() argument
|
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http/src/body/mime/decode/ |
H A D | multi.rs | 118 ) -> Result<(TokenStatus<MimeMulti, ()>, &'a [u8]), HttpError> { in decode() argument 156 ) -> Result<&'a [u8], HttpError> { in unknown_decode() argument 201 ) -> Result<&'a [u8], HttpError> { in part_decode() argument 234 ) -> Result<&'a [u8], HttpError> { in middle_or_end_boundary_decode() argument 260 ) -> Result<&'a [u8], HttpError> { in first_boundary_decode() argument 272 ) -> Result<&'a [u8], HttpError> { in outermost_first_boundary_decode() argument 299 ) -> Result<&'a [u8], HttpError> { in inner_first_boundary_decode() argument 334 fn stages_pop(&mut self) -> Result<MultiStage, HttpError> { in stages_pop() argument 341 fn last_multi(&self) -> Result<&MimeMulti<'static>, HttpError> { in last_multi() argument 355 fn last_stage(&self) -> Result<&MultiStage, HttpError> { in last_stage() argument [all …]
|
H A D | part.rs | 73 ) -> Result<(TokenStatus<MimePart<'static>, ()>, &'a [u8]), HttpError> { in decode() argument 101 fn start_decode<'a>(&mut self, buf: &'a [u8]) -> Result<&'a [u8], HttpError> { in start_decode() argument 108 fn headers_decode<'a>(&mut self, buf: &'a [u8]) -> Result<&'a [u8], HttpError> { in headers_decode() argument 119 fn body_decode<'a>(&mut self, buf: &'a [u8]) -> Result<&'a [u8], HttpError> { in body_decode() argument
|
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http/src/request/uri/ |
H A D | percent_encoding.rs | 54 pub fn parse(origin: &str) -> Result<String, HttpError> { in parse() argument 70 fn parse_scheme<'a>(&mut self, mut origin: UrlChars<'a>) -> Result<UrlChars<'a>, HttpError> { in parse_scheme() argument 86 fn parse_double_slash<'a>(&mut self, origin: UrlChars<'a>) -> Result<UrlChars<'a>, HttpError> { in parse_double_slash() argument 106 fn parse_userinfo<'a>(&mut self, mut origin: UrlChars<'a>) -> Result<UrlChars<'a>, HttpError> { in parse_userinfo() argument 151 fn parse_authority<'a>(&mut self, mut origin: UrlChars<'a>) -> Result<UrlChars<'a>, HttpError> { in parse_authority() argument 172 fn parse_path<'a>(&mut self, mut origin: UrlChars<'a>) -> Result<UrlChars<'a>, HttpError> { in parse_path() argument 198 fn parse_query_and_fragment(&mut self, mut origin: UrlChars) -> Result<(), HttpError> { in parse_query_and_fragment() argument 218 fn parse_query<'a>(&mut self, mut origin: UrlChars<'a>) -> Result<UrlChars<'a>, HttpError> { in parse_query() argument 232 fn parse_fragment(&mut self, mut origin: UrlChars) -> Result<(), HttpError> { in parse_fragment() argument
|
H A D | mod.rs | 225 pub fn from_bytes(bytes: &[u8]) -> Result<Self, HttpError> { in from_bytes() argument 512 pub fn build(self) -> Result<Uri, HttpError> { in build() argument 817 pub fn as_u16(&self) -> Result<u16, HttpError> { in as_u16() argument
|
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http/src/body/mime/ |
H A D | mimetype.rs | 62 pub fn from_bytes(bytes: &'a [u8]) -> Result<Self, HttpError> { in from_bytes() argument 98 pub fn from_path(path: &'a Path) -> Result<Self, HttpError> { in from_path() argument 567 fn from_bytes(b: &[u8]) -> Result<Self, HttpError> { in from_bytes() argument 619 fn mime_byte_a(b: &[u8]) -> Result<MimeTypeTag, HttpError> { in mime_byte_a() argument 630 fn mime_byte_m(b: &[u8]) -> Result<MimeTypeTag, HttpError> { in mime_byte_m() argument
|
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http/src/h1/request/ |
H A D | encoder.rs | 251 pub fn encode(&mut self, dst: &mut [u8]) -> Result<usize, HttpError> { in encode() argument 310 fn method_encode(&mut self, dst: &mut [u8]) -> Result<usize, HttpError> { in method_encode() argument 323 fn method_sp_encode(&mut self, dst: &mut [u8]) -> Result<usize, HttpError> { in method_sp_encode() argument 337 fn uri_encode(&mut self, dst: &mut [u8]) -> Result<usize, HttpError> { in uri_encode() argument 350 fn uri_sp_encode(&mut self, dst: &mut [u8]) -> Result<usize, HttpError> { in uri_sp_encode() argument 363 fn version_encode(&mut self, dst: &mut [u8]) -> Result<usize, HttpError> { in version_encode() argument 376 fn version_crlf_encode(&mut self, dst: &mut [u8]) -> Result<usize, HttpError> { in version_crlf_encode() argument 389 fn header_encode(&mut self, dst: &mut [u8]) -> Result<usize, HttpError> { in header_encode() argument 402 fn header_crlf_encode(&mut self, dst: &mut [u8]) -> Result<usize, HttpError> { in header_crlf_encode() argument
|
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http/src/response/ |
H A D | status.rs | 51 pub fn from_u16(code: u16) -> Result<StatusCode, HttpError> { in from_u16() argument 81 pub fn from_bytes(bytes: &[u8]) -> Result<Self, HttpError> { in from_bytes() argument
|
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http/src/body/ |
H A D | chunk.rs | 959 pub fn decode<'a>(&mut self, buf: &'a [u8]) -> Result<(Chunks<'a>, &'a [u8]), HttpError> { in decode() argument 1030 pub fn get_trailer(&self) -> Result<Option<Headers>, HttpError> { in get_trailer() argument 1083 fn hex_to_decimal(mut count: i64, num: i64) -> Result<i64, HttpError> { in hex_to_decimal() argument 1092 fn decode_size<'a>(&mut self, buf: &'a [u8]) -> Result<(Chunk<'a>, &'a [u8]), HttpError> { in decode_size() argument 1166 ) -> Result<(Chunk<'a>, &'a [u8]), HttpError> { in decode_special_char() argument 1239 fn skip_crlf<'a>(&mut self, buf: &'a [u8]) -> Result<(Chunk<'a>, &'a [u8]), HttpError> { in skip_crlf() argument 1285 fn decode_cr(&mut self) -> Result<(), HttpError> { in decode_cr() argument 1293 fn decode_lf(&mut self) -> Result<(), HttpError> { in decode_lf() argument 1304 ) -> Result<(Chunk<'a>, &'a [u8]), HttpError> { in decode_trailer_data() argument 1365 ) -> Result<(Chunk<'a>, &'a [u8]), HttpError> { in skip_trailer_last_crlf() argument [all …]
|
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http_client/src/async_impl/conn/ |
H A D | http2.rs | 129 ) -> Result<Frame, HttpError> { in build_headers_frame() argument 153 fn remove_connection_specific_headers(headers: &mut Headers) -> Result<(), HttpError> { in remove_connection_specific_headers() argument 174 fn build_pseudo_headers(request_part: &mut RequestPart) -> Result<PseudoHeaders, HttpError> { in build_pseudo_headers() argument
|