Home
last modified time | relevance | path

Searched refs:try_from (Results 1 – 25 of 44) sorted by relevance

12

/third_party/rust/crates/serde/test_suite/tests/ui/type-attribute/
Dtry_from.stderr1 error: failed to parse type: try_from = "Option<T"
2 --> tests/ui/type-attribute/try_from.rs:4:20
4 4 | #[serde(try_from = "Option<T")]
Dtry_from.rs4 #[serde(try_from = "Option<T")]
/third_party/rust/crates/rustix/src/process/
Dprctl.rs63 TryFrom::try_from(value) in prctl_get_at_arg2()
126 fn try_from(value: i32) -> Result<Self, Self::Error> { in try_from() method
331 fn try_from(value: i32) -> Result<Self, Self::Error> { in try_from() method
390 fn try_from(value: u32) -> Result<Self, Self::Error> { in try_from() method
451 fn try_from(value: u32) -> Result<Self, Self::Error> { in try_from() method
537 fn try_from(value: u32) -> Result<Self, Self::Error> { in try_from() method
557 MachineCheckMemoryCorruptionKillPolicy::try_from(r) in machine_check_memory_corruption_kill_policy()
662 let fd = usize::try_from(fd.as_raw_fd()).map_err(|_r| io::Errno::RANGE)?; in set_executable_file()
855 fn try_from(value: u32) -> Result<Self, Self::Error> { in try_from() method
873 FloatingPointMode::try_from(r) in floating_point_mode()
[all …]
/third_party/rust/crates/serde/test_suite/tests/ui/transparent/
Dwith_try_from.stderr1 error: #[serde(transparent)] is not allowed with #[serde(try_from = "...")]
4 4 | / #[serde(transparent, try_from = "u64")]
Dwith_try_from.rs4 #[serde(transparent, try_from = "u64")]
/third_party/rust/crates/serde/test_suite/tests/ui/conflict/
Dfrom-try-from.stderr1 error: #[serde(from = "...")] and #[serde(try_from = "...")] conflict with each other
4 4 | / #[serde(from = "u64", try_from = "u64")]
Dfrom-try-from.rs4 #[serde(from = "u64", try_from = "u64")]
/third_party/rust/crates/minimal-lexical/tests/
Dvec_tests.rs37 let x = VecType::try_from(&[5, 1]).unwrap(); in simple_test()
73 let x = VecType::try_from(&[5, 1]).unwrap(); in cmp_test()
79 let x = VecType::try_from(&[5, 1, 9]).unwrap(); in cmp_test()
80 let y = VecType::try_from(&[6, 2, 8]).unwrap(); in cmp_test()
85 let x = VecType::try_from(&[0, 1, 9]).unwrap(); in cmp_test()
86 let y = VecType::try_from(&[4294967295, 0, 9]).unwrap(); in cmp_test()
93 let mut x = VecType::try_from(&[0, 1, 9]).unwrap(); in math_test()
/third_party/rust/crates/bindgen/bindgen-tests/tests/expectations/tests/libclang-9/
Dobjc_inheritance.rs52 fn try_from(parent: Foo) -> Result<Bar, Self::Error> { in try_from() method
87 fn try_from(parent: Bar) -> Result<Baz, Self::Error> { in try_from() method
105 fn try_from(parent: Foo) -> Result<Baz, Self::Error> { in try_from() method
/third_party/rust/crates/bindgen/bindgen-tests/tests/expectations/tests/libclang-5/
Dobjc_inheritance.rs52 fn try_from(parent: Foo) -> Result<Bar, Self::Error> { in try_from() method
87 fn try_from(parent: Bar) -> Result<Baz, Self::Error> { in try_from() method
105 fn try_from(parent: Foo) -> Result<Baz, Self::Error> { in try_from() method
/third_party/rust/crates/nix/src/sys/
Dwait.rs161 Signal::try_from(libc::WTERMSIG(status)) in term_signal()
173 Signal::try_from(libc::WSTOPSIG(status)) in stop_signal()
276 Signal::try_from(si_status)?, in from_siginfo()
280 WaitStatus::Stopped(pid, Signal::try_from(si_status)?) in from_siginfo()
290 Signal::try_from(si_status & 0xff)?, in from_siginfo()
Dtermios.rs1220 fn try_from() { in try_from() function
1221 assert_eq!(Ok(BaudRate::B0), BaudRate::try_from(libc::B0)); in try_from()
1223 BaudRate::try_from(999999999).expect_err("assertion failed"); in try_from()
1225 BaudRate::try_from(99).expect_err("assertion failed"); in try_from()
/third_party/rust/crates/rust-openssl/openssl/src/
Dcipher_ctx.rs223 let pub_keys_len = i32::try_from(pub_keys.len()).unwrap(); in seal_init()
270 let len = c_int::try_from(encrypted_key.len()).unwrap(); in open_init()
404 let len = c_int::try_from(len).unwrap(); in set_iv_length()
443 let len = c_int::try_from(tag.len()).unwrap(); in tag()
462 let len = c_int::try_from(len).unwrap(); in set_tag_length()
479 let len = c_int::try_from(tag.len()).unwrap(); in set_tag()
508 let len = c_int::try_from(len).unwrap(); in set_data_len()
588 let inlen = c_int::try_from(input.len()).unwrap(); in cipher_update_unchecked()
646 let inlen = c_int::try_from(inlen).unwrap(); in cipher_update_inplace()
Dpkey.rs806 fn try_from(ec_key: EcKey<T>) -> Result<PKey<T>, ErrorStack> { in try_from() method
814 fn try_from(pkey: PKey<T>) -> Result<EcKey<T>, ErrorStack> { in try_from() method
822 fn try_from(rsa: Rsa<T>) -> Result<PKey<T>, ErrorStack> { in try_from() method
830 fn try_from(pkey: PKey<T>) -> Result<Rsa<T>, ErrorStack> { in try_from() method
838 fn try_from(dsa: Dsa<T>) -> Result<PKey<T>, ErrorStack> { in try_from() method
846 fn try_from(pkey: PKey<T>) -> Result<Dsa<T>, ErrorStack> { in try_from() method
855 fn try_from(dh: Dh<T>) -> Result<PKey<T>, ErrorStack> { in try_from() method
863 fn try_from(pkey: PKey<T>) -> Result<Dh<T>, ErrorStack> { in try_from() method
Dpkey_ctx.rs505 let len = LenType::try_from(label.len()).unwrap(); in set_rsa_oaep_label()
549 let len = c_int::try_from(key.len()).unwrap(); in set_keygen_mac_key()
615 let len = c_int::try_from(key.len()).unwrap(); in set_hkdf_key()
640 let len = c_int::try_from(salt.len()).unwrap(); in set_hkdf_salt()
665 let len = c_int::try_from(info.len()).unwrap(); in add_hkdf_info()
/third_party/rust/crates/unicode-ident/generate/src/
Dmain.rs50 let Ok(new) = u8::try_from(chunkmap.len()) else { in main()
115 match u8::try_from(halfdense.len() / (CHUNK / 2)) { in main()
132 match u8::try_from(halfdense.len() / (CHUNK / 2) - 1) { in main()
/third_party/rust/crates/rustix/src/thread/
Dprctl.rs110 fn try_from(value: i32) -> Result<Self, Self::Error> { in try_from() method
494 let value = usize::try_from(value.map_or(0, NonZeroU64::get)).map_err(|_r| io::Errno::RANGE)?; in set_current_timer_slack()
688 u32::try_from(vector_length_in_bytes).map_err(|_r| io::Errno::RANGE)?; in set_sve_vector_length_configuration()
832 fn try_from(value: u8) -> Result<Self, Self::Error> { in try_from() method
894 fn try_from(value: u32) -> Result<Self, Self::Error> { in try_from() method
/third_party/rust/crates/nix/test/sys/
Dtest_signalfd.rs25 let signo = Signal::try_from(res.ssi_signo as i32).unwrap(); in test_signalfd()
Dtest_signal.rs88 let signal = Signal::try_from(signal).unwrap(); in test_sigaction_handler()
/third_party/rust/crates/bindgen/bindgen-tests/tests/expectations/tests/
Dobjc_protocol_inheritance.rs55 fn try_from(parent: Foo) -> Result<Bar, Self::Error> { in try_from() method
/third_party/rust/crates/memchr/src/memmem/prefilter/
Dmod.rs460 rare1i = u8::try_from(i).unwrap(); in new()
463 rare2i = u8::try_from(i).unwrap(); in new()
/third_party/rust/crates/nix/test/
Dtest_timer.rs16 let signal = Signal::try_from(raw_signal).unwrap(); in handle_sigalarm()
/third_party/qrcodegen/rust/src/
Dlib.rs245 bb.append_bits(u32::try_from(seg.numchars).unwrap(), seg.mode.num_char_count_bits(version)); in encode_segments_advanced()
254 bb.append_bits(0, u8::try_from(numzerobits).unwrap()); in encode_segments_advanced()
256 bb.append_bits(0, u8::try_from(numzerobits).unwrap()); in encode_segments_advanced()
1021 accumdata = accumdata * 45 + u32::try_from(i).unwrap(); in make_alphanumeric()
/third_party/rust/crates/minimal-lexical/src/
Dheapvec.rs32 pub fn try_from(x: &[bigint::Limb]) -> Option<Self> { in try_from() method
/third_party/rust/crates/nix/src/
Difaddrs.rs74 u8::try_from(mem::size_of::<libc::sockaddr_storage>()).unwrap(); in workaround_xnu_bug()

12