/commonlibrary/rust/ylong_http/ylong_http/tests/ |
H A D | sdv_http_version.rs | 21 /// 1. Creates a Version by build try_from. 31 assert_eq!(Version::try_from("HTTP/1.0").unwrap(), Version::HTTP1_0); in sdv_client_send_request_repeatedly() 32 assert_eq!(Version::try_from("HTTP/1.1").unwrap(), Version::HTTP1_1); in sdv_client_send_request_repeatedly() 33 assert_eq!(Version::try_from("HTTP/2.0").unwrap(), Version::HTTP2); in sdv_client_send_request_repeatedly() 34 assert_eq!(Version::try_from("HTTP/3.0").unwrap(), Version::HTTP3); in sdv_client_send_request_repeatedly() 35 assert!(Version::try_from("http/1.0").is_err()); in sdv_client_send_request_repeatedly() 36 assert!(Version::try_from("http/1.1").is_err()); in sdv_client_send_request_repeatedly() 37 assert!(Version::try_from("http/2.0").is_err()); in sdv_client_send_request_repeatedly() 38 assert!(Version::try_from("http/3.0").is_err()); in sdv_client_send_request_repeatedly()
|
/commonlibrary/rust/ylong_http/ylong_http/src/ |
H A D | headers.rs | 70 /// let header = Header::try_from(("Example-Field", "Foo")).unwrap(); 111 /// let header = Header::try_from(("Example-Field", "Foo")).unwrap(); 129 /// let header = Header::try_from(("Example-Field", "Foo")).unwrap(); 148 /// let header = Header::try_from(("Example-Field", "Foo")).unwrap(); 168 fn try_from(pair: (N, V)) -> Result<Self, Self::Error> { in try_from() functions 170 HeaderName::try_from(pair.0).map_err(Into::into)?, in try_from() 171 HeaderValue::try_from(pair.1).map_err(Into::into)?, in try_from() 271 fn try_from(name: &str) -> Result<Self, Self::Error> { in try_from() functions 279 fn try_from(bytes: &[u8]) -> Result<Self, Self::Error> { in try_from() functions 491 fn try_from(valu functions 509 fn try_from(value: &[u8]) -> Result<Self, Self::Error> { try_from() functions [all...] |
H A D | version.rs | 74 fn try_from(str: &'a str) -> Result<Self, Self::Error> { in try_from() functions 111 /// UT test cases for `Version::try_from`. 114 /// 1. Checks whether `Version::try_from` is correct. 117 assert_eq!(Version::try_from("HTTP/1.0").unwrap(), Version::HTTP1_0); in ut_version_try_from() 118 assert_eq!(Version::try_from("HTTP/1.1").unwrap(), Version::HTTP1_1); in ut_version_try_from() 119 assert_eq!(Version::try_from("HTTP/2.0").unwrap(), Version::HTTP2); in ut_version_try_from() 120 assert_eq!(Version::try_from("HTTP/3.0").unwrap(), Version::HTTP3); in ut_version_try_from() 121 assert!(Version::try_from("http/1.0").is_err()); in ut_version_try_from() 122 assert!(Version::try_from("http/1.1").is_err()); in ut_version_try_from() 123 assert!(Version::try_from("htt in ut_version_try_from() [all...] |
/commonlibrary/rust/ylong_http/ylong_http/src/h3/ |
H A D | octets.rs | 29 let bytes: [u8; $len] = <[u8; $len]>::try_from($buf[..$len].as_ref()).unwrap();
|
/commonlibrary/rust/ylong_http/ylong_http/src/request/ |
H A D | mod.rs | 528 part.method = Method::try_from(method).map_err(Into::into)?; in method() 550 part.uri = Uri::try_from(uri).map_err(Into::into)?; in url() 571 part.version = Version::try_from(version).map_err(Into::into)?; in version() 764 *request.uri_mut() = Uri::try_from("www.test.com").unwrap(); in ut_request_builder_build_2()
|
H A D | method.rs | 172 fn try_from(t: &'a [u8]) -> Result<Self, Self::Error> { in try_from() functions 180 fn try_from(t: &'a str) -> Result<Self, Self::Error> { in try_from() functions
|
/commonlibrary/rust/ylong_http/ylong_http/src/request/uri/ |
H A D | mod.rs | 355 fn try_from(s: &'a [u8]) -> Result<Self, Self::Error> { in try_from() functions 363 fn try_from(s: &'a str) -> Result<Self, Self::Error> { in try_from() functions 616 fn try_from(bytes: &'a [u8]) -> Result<Self, Self::Error> { in try_from() functions 624 fn try_from(s: &'a str) -> Result<Self, Self::Error> { in try_from() functions 625 TryFrom::try_from(s.as_bytes()) in try_from() 730 fn try_from(bytes: &'a [u8]) -> Result<Self, Self::Error> { in try_from() functions 738 fn try_from(s: &'a str) -> Result<Self, Self::Error> { in try_from() functions 739 TryFrom::try_from(s.as_bytes()) in try_from() 913 fn try_from(bytes: &'a [u8]) -> Result<Self, Self::Error> { in try_from() functions 921 fn try_from( in try_from() functions 966 fn try_from(s: &'a [u8]) -> Result<Self, Self::Error> { try_from() functions 974 fn try_from(s: &'a str) -> Result<Self, Self::Error> { try_from() functions [all...] |
/commonlibrary/rust/ylong_http/ylong_http/src/h2/ |
H A D | error.rs | 113 fn try_from(value: u32) -> Result<Self, Self::Error> { in try_from() functions 141 /// Unit test cases for `ErrorCode::try_from`.
|
H A D | frame.rs | 571 ErrorCode::try_from(self.error_code)?, in error()
|
/commonlibrary/rust/ylong_http/ylong_http/src/response/ |
H A D | status.rs | 211 fn try_from(value: u16) -> Result<Self, Self::Error> { in try_from() functions 219 fn try_from(value: &'a [u8]) -> Result<Self, Self::Error> { in try_from() functions
|
/commonlibrary/rust/ylong_http/ylong_http_client/src/util/ |
H A D | redirect.rs | 68 .and_then(|str| Uri::try_from(str.as_bytes()).ok())
|
H A D | proxy.rs | 156 let mut uri = match Uri::try_from(uri) {
|
/commonlibrary/rust/ylong_http/ylong_http_client/src/util/config/ |
H A D | http.rs | 73 fn try_from(value: &[u8]) -> Result<Self, Self::Error> { in try_from() functions
|
/commonlibrary/rust/ylong_http/ylong_http_client/src/util/c_openssl/verify/ |
H A D | pinning.rs | 96 let parsed = Uri::try_from(uri).map_err(|e| HttpClientError::from_error(Build, e))?; in add()
|
/commonlibrary/rust/ylong_http/ylong_http_client/src/async_impl/conn/ |
H A D | http2.rs | 102 ErrorCode::try_from(reset.error_code()).unwrap_or(ErrorCode::ProtocolError), in frame_2_response()
|
/commonlibrary/rust/ylong_json/src/ |
H A D | states.rs | 330 let unicode = match char::try_from(unicode1 as u32) { in parse_unicode()
|