/commonlibrary/rust/ylong_json/benches/ |
H A D | serialize_json_cmp.rs | 32 let value = JsonValue::from_str(NULL_EXAMPLE).unwrap(); in null_serialize_perf_ylong_json() 42 let value = JsonValue::from_str(BOOLEAN_EXAMPLE).unwrap(); in boolean_serialize_perf_ylong_json() 52 let value = JsonValue::from_str(NUMBER_EXAMPLE).unwrap(); in number_serialize_perf_ylong_json() 62 let value = JsonValue::from_str(STRING_EXAMPLE).unwrap(); in string_serialize_perf_ylong_json() 72 let value = JsonValue::from_str(ARRAY_EXAMPLE).unwrap(); in array_serialize_perf_ylong_json() 82 let value = JsonValue::from_str(OBJECT_EXAMPLE).unwrap(); in object_serialize_perf_ylong_json() 92 let value = JsonValue::from_str(RFC7159_EXAMPLE1).unwrap(); in exp1_serialize_perf_ylong_json() 102 let value = JsonValue::from_str(RFC7159_EXAMPLE2).unwrap(); in exp2_serialize_perf_ylong_json() 112 let value = JsonValue::from_str(JSON_PARSE_TEST).unwrap(); in exp3_serialize_perf_ylong_json() 122 let value = JsonValue::from_str(LONG_KEY_VALU in exp4_serialize_perf_ylong_json() [all...] |
H A D | deserialize_json_cmp.rs | 34 let _value = JsonValue::from_str(NULL_EXAMPLE).unwrap(); in null_deserialize_perf_ylong_json() 43 let _value = JsonValue::from_str(BOOLEAN_EXAMPLE).unwrap(); in boolean_deserialize_perf_ylong_json() 52 let _value = JsonValue::from_str(NUMBER_EXAMPLE).unwrap(); in number_deserialize_perf_ylong_json() 61 let _value = JsonValue::from_str(STRING_EXAMPLE).unwrap(); in string_deserialize_perf_ylong_json() 70 let _value = JsonValue::from_str(ARRAY_EXAMPLE).unwrap(); in array_deserialize_perf_ylong_json() 79 let _value = JsonValue::from_str(OBJECT_EXAMPLE).unwrap(); in object_deserialize_perf_ylong_json() 88 let _value = JsonValue::from_str(RFC7159_EXAMPLE1).unwrap(); in exp1_deserialize_perf_ylong_json() 97 let _value = JsonValue::from_str(RFC7159_EXAMPLE2).unwrap(); in exp2_deserialize_perf_ylong_json() 106 let _value = JsonValue::from_str(JSON_PARSE_TEST).unwrap(); in exp3_deserialize_perf_ylong_json() 115 let _value = JsonValue::from_str(LONG_KEY_VALU in exp4_deserialize_perf_ylong_json() [all...] |
/commonlibrary/rust/ylong_http/ylong_http_client/src/ |
H A D | error.rs | 158 pub(crate) fn from_str(kind: ErrorKind, msg: &'static str) -> Self { 331 Err(HttpClientError::from_str(ErrorKind::$kind, $msg)) 397 HttpClientError::from_str(ErrorKind::Request, "test error"), in ut_err_from_error() 402 /// UT test cases for `HttpClientError::from_str` function. 405 /// 1. Calls `HttpClientError::from_str`. 409 let error_request = HttpClientError::from_str(ErrorKind::Request, "error"); in ut_err_from_str() 411 let error_timeout = HttpClientError::from_str(ErrorKind::Timeout, "error"); in ut_err_from_str() 431 let error = HttpClientError::from_str(ErrorKind::Request, "error"); in ut_client_err_io_error()
|
/commonlibrary/rust/ylong_http/ylong_http_client/src/sync_impl/ |
H A D | http_body.rs | 113 HttpClientError::from_str(ErrorKind::BodyDecode, "Get trailer failed") in trailer() 142 return Err(HttpClientError::from_str(ErrorKind::BodyDecode, "Not Eof")); in data() 159 return Err(HttpClientError::from_str( in data() 171 return Err(HttpClientError::from_str( in data() 240 return Err(HttpClientError::from_str( in data() 302 return Err(HttpClientError::from_str( in merge_chunks()
|
/commonlibrary/rust/ylong_json/src/ |
H A D | deserializer.rs | 156 /// use ylong_json::from_str; 171 /// assert_eq!(expected, from_str(str).unwrap()) 173 pub fn from_str<'a, T>(str: &'a str) -> Result<T, Error> in from_str() functions 847 use crate::deserializer::{from_slice, from_str}; 1038 /// 1.Uses deserializer::from_str method to deserialize struct. 1046 assert_eq!(expected, from_str(str).unwrap()); in ut_deserialize_struct() 1052 assert_eq!(expected, from_str(str).unwrap()); in ut_deserialize_struct() 1058 assert_eq!(expected, from_str(str).unwrap()); in ut_deserialize_struct() 1073 assert_eq!(expected, from_str(str).unwrap()); in ut_deserialize_struct() 1085 assert_eq!(expected, from_str(st [all...] |
H A D | lib.rs | 83 pub use deserializer::{from_reader, from_slice, from_str};
|
H A D | value.rs | 814 /// let value = JsonValue::from_str(text).unwrap(); 818 fn from_str(s: &str) -> Result<Self, Self::Err> { in from_str() functions 1612 /// UT test for `JsonValue::from_str`. 1618 /// 1. Calls `JsonValue::from_str` to create a `JsonValue`. 1622 assert_eq!(JsonValue::from_str("null").unwrap(), JsonValue::new_null()); in ut_json_value_from_str()
|
/commonlibrary/rust/ylong_http/ylong_http_client/src/util/ |
H A D | alt_svc.rs | 66 Port::from_str(str::from_utf8(&host_port[1..]).ok()?).ok()?, in parse_alt_svc() 70 Some(Host::from_str(str::from_utf8(&host_port[..index]).ok()?).ok()?), in parse_alt_svc() 71 Port::from_str(str::from_utf8(&host_port[(index + 1)..]).ok()?).ok()?, in parse_alt_svc()
|
H A D | redirect.rs | 69 .ok_or(HttpClientError::from_str( 129 .ok_or(HttpClientError::from_str( in trigger()
|
H A D | proxy.rs | 91 self.no_proxy = NoProxy::from_str(no_proxy); 194 pub(crate) fn from_str(no_proxy: &str) -> Option<Self> {
|
H A D | dispatcher.rs | 440 HttpClientError::from_str(ErrorKind::Request, "Request Sender Closed !") 579 None => Err(HttpClientError::from_str( 662 HttpClientError::from_str(Request, "Coroutine channel closed.") 665 HttpClientError::from_str(Request, "remote peer closed.") 812 HttpClientError::from_str(ErrorKind::Request, "Request Sender Closed !") 899 HttpClientError::from_str(Request, "Coroutine channel closed.") 903 HttpClientError::from_str(Request, "received remote goaway.") 906 HttpClientError::from_str(Request, "stream finished.") 909 HttpClientError::from_str(Request, "remote peer closed.")
|
H A D | normalizer.rs | 34 return Err(HttpClientError::from_str( 109 .map_err(|_| HttpClientError::from_str(ErrorKind::Request, "Normalize url failed"))?;
|
/commonlibrary/rust/ylong_json/tests/ |
H A D | sdv_adapt_serde_test.rs | 16 use ylong_json::from_str; 69 let de_res = from_str::<ExampleOne>(RFC7159_EXAMPLE1); in sdv_adapt_serde_example_one() 133 let de_res = from_str::<Vec<ExampleTwo>>(RFC7159_EXAMPLE2).unwrap(); in sdv_adapt_serde_example_two() 364 let de_res = from_str::<ParseTest>(JSON_PARSE_EXAMPLE3); in sdv_adapt_serde_example_three()
|
/commonlibrary/rust/ylong_http/ylong_http_client/src/async_impl/connector/ |
H A D | mod.rs | 319 Err(last_e.unwrap_or(HttpClientError::from_str( in connect() 557 vec![SocketAddr::from_str(handle.addr.as_str()).unwrap()], in ut_ssl_tunnel_error() 595 vec![SocketAddr::from_str(handle.addr.as_str()).unwrap()], in ut_ssl_tunnel_error() 635 vec![SocketAddr::from_str(handle.addr.as_str()).unwrap()], in ut_ssl_tunnel_error() 682 vec![SocketAddr::from_str(handle.addr.as_str()).unwrap()], in ut_ssl_tunnel_connect() 729 vec![SocketAddr::from_str(handle.addr.as_str()).unwrap()], in ut_ssl_tunnel_resp_beyond_size()
|
/commonlibrary/rust/ylong_http/ylong_http_client/src/async_impl/conn/ |
H A D | http3.rs | 118 return Err(HttpClientError::from_str( in frame_2_response() 134 return Err(HttpClientError::from_str(ErrorKind::Request, "bad frame")); in frame_2_response()
|
/commonlibrary/rust/ylong_http/ylong_http_client/src/async_impl/quic/ |
H A D | mod.rs | 72 .map_err(|_| HttpClientError::from_str(ErrorKind::Connect, "Quic init error"))?; 114 Err(HttpClientError::from_str( 152 e = Err(HttpClientError::from_str(
|
/commonlibrary/rust/ylong_http/ylong_http/src/request/uri/ |
H A D | mod.rs | 790 /// let host = Host::from_str("www.example.com").unwrap(); 793 fn from_str(host: &str) -> Result<Self, Self::Err> { in from_str() functions 860 /// let host = Port::from_str("80").unwrap(); 863 fn from_str(port: &str) -> Result<Self, Self::Err> { in from_str() functions
|