Home
last modified time | relevance | path

Searched refs:from_str (Results 1 – 23 of 23) sorted by relevance

/ohos5.0/commonlibrary/rust/ylong_json/benches/
H A Ddeserialize_json_cmp.rs34 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_VALUE).unwrap(); in exp4_deserialize_perf_ylong_json()
[all …]
H A Dserialize_json_cmp.rs32 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_VALUE).unwrap(); in exp4_serialize_perf_ylong_json()
[all …]
/ohos5.0/commonlibrary/rust/ylong_json/examples/
H A Dylong_json_perf.rs46 let value = JsonValue::from_str(JSON_TEXT).unwrap(); in main()
51 let value = JsonValue::from_str(JSON_TEXT).unwrap(); in main()
60 let value: Value = serde_json::from_str(JSON_TEXT).unwrap(); in main()
65 let value: Value = serde_json::from_str(JSON_TEXT).unwrap(); in main()
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http_client/src/sync_impl/
H A Dhttp_body.rs113 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()
H A Dconnector.rs179 return Err(HttpClientError::from_str( in tunnel()
192 return Err(HttpClientError::from_str( in tunnel()
198 return Err(HttpClientError::from_str( in tunnel()
203 return Err(HttpClientError::from_str( in tunnel()
/ohos5.0/commonlibrary/rust/ylong_json/docs/
H A Duser_guide_zh.md18 // 可以使用 from_str 接口,从 &str 类型尝试生成 JsonValue 实例。
20 let json_value = JsonValue::from_str(str);
53 // 可以使用 from_str 接口,从 &str 类型生成实例。
56 let example = from_str::<Example>(str).unwrap();
89 let json_value = JsonValue::from_str(JSON_TEXT).unwrap();
123 let mut json_value = JsonValue::from_str(JSON_TEXT).unwrap();
H A Duser_guide.md18 // You can use `from_str` to try to generate a `JsonValue` instance from
22 let json_value = JsonValue::from_str(str);
61 // You can use `from_str` to try to generate an instance from String.
65 let example = from_str::<Example>(str).unwrap();
102 let json_value = JsonValue::from_str(JSON_TEXT).unwrap();
143 let mut json_value = JsonValue::from_str(JSON_TEXT).unwrap();
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http_client/src/
H A Derror.rs158 pub(crate) fn from_str(kind: ErrorKind, msg: &'static str) -> Self { in from_str() method
331 Err(HttpClientError::from_str(ErrorKind::$kind, $msg))
397 HttpClientError::from_str(ErrorKind::Request, "test error"), in ut_err_from_error()
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()
/ohos5.0/commonlibrary/rust/ylong_json/src/
H A Ddeserializer.rs173 pub fn from_str<'a, T>(str: &'a str) -> Result<T, Error> in from_str() function
847 use crate::deserializer::{from_slice, from_str};
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()
1090 let res = from_str::<Test>(str_abnormal); in ut_deserialize_struct()
1095 let res = from_str::<Test>(str_abnormal); in ut_deserialize_struct()
1100 let res = from_str::<Test>(str_abnormal); in ut_deserialize_struct()
1105 let res = from_str::<Test>(str_abnormal); in ut_deserialize_struct()
[all …]
H A Dlib.rs83 pub use deserializer::{from_reader, from_slice, from_str};
H A Dvalue.rs818 fn from_str(s: &str) -> Result<Self, Self::Err> { in from_str() method
1622 assert_eq!(JsonValue::from_str("null").unwrap(), JsonValue::new_null()); in ut_json_value_from_str()
/ohos5.0/commonlibrary/rust/ylong_json/tests/
H A Dsdv_adapt_serde_test.rs16 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()
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http_client/src/util/
H A Dredirect.rs68 .ok_or(HttpClientError::from_str( in redirect()
128 .ok_or(HttpClientError::from_str( in trigger()
H A Ddispatcher.rs426 HttpClientError::from_str(ErrorKind::Request, "Request Sender Closed !") in send_frame_to_controller()
571 None => Err(HttpClientError::from_str( in recv()
654 HttpClientError::from_str(Request, "Coroutine channel closed.") in dispatch_client_error()
657 HttpClientError::from_str(Request, "remote peer closed.") in dispatch_client_error()
H A Dnormalizer.rs34 return Err(HttpClientError::from_str( in format()
109 .map_err(|_| HttpClientError::from_str(ErrorKind::Request, "Normalize url failed"))?; in format()
H A Dproxy.rs91 self.no_proxy = NoProxy::from_str(no_proxy); in no_proxy()
194 pub(crate) fn from_str(no_proxy: &str) -> Option<Self> { in from_str() method
/ohos5.0/foundation/communication/netstack/interfaces/innerkits/rust/ylong_http_client/src/reqwest_impl/
H A Drequest.rs208 HeaderValue::from_str(value.as_str()) in multipart()
215 HeaderValue::from_str(format!("{}", size).as_str()) in multipart()
/ohos5.0/base/security/code_signature/services/key_enable/src/
H A Dcert_path_utils.rs58 fn from_str(s: &str) -> Result<u32, ()> { in from_str() method
86 fn from_str(s: &str) -> Result<u32, ()> { in from_str() method
254 "Release" => ReleaseCertPathType::from_str(cert_type), in path_resolver()
255 "Dev" => DebugCertPathType::from_str(cert_type), in path_resolver()
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http_client/src/async_impl/connector/
H A Dmod.rs482 vec![SocketAddr::from_str(handle.addr.as_str()).unwrap()], in ut_ssl_tunnel_error()
520 vec![SocketAddr::from_str(handle.addr.as_str()).unwrap()], in ut_ssl_tunnel_error()
560 vec![SocketAddr::from_str(handle.addr.as_str()).unwrap()], in ut_ssl_tunnel_error()
607 vec![SocketAddr::from_str(handle.addr.as_str()).unwrap()], in ut_ssl_tunnel_connect()
654 vec![SocketAddr::from_str(handle.addr.as_str()).unwrap()], in ut_ssl_tunnel_resp_beyond_size()
/ohos5.0/build/rust/tests/test_bin_cargo_crate/crate/
H A Dbuild.rs72 u32::from_str(next_var).ok() in rustc_minor_version()
/ohos5.0/build/rust/tests/test_rlib_cargo_crate/crate/
H A Dbuild.rs101 u32::from_str(next_var).ok() in rustc_minor_version()
/ohos5.0/docs/zh-cn/device-dev/subsystems/
H A Dsubsys-build-rust-compilation.md249 u32::from_str(next_var).ok()
/ohos5.0/docs/en/device-dev/subsystems/
H A Dsubsys-build-rust-compilation.md251 u32::from_str(next_var).ok()