Home
last modified time | relevance | path

Searched refs:try_from (Results 1 - 25 of 36) sorted by relevance

12

/third_party/rust/crates/rustix/src/process/
H A Dprctl.rs63 TryFrom::try_from(value)
126 fn try_from(value: i32) -> Result<Self, Self::Error> { in try_from() functions
331 fn try_from(value: i32) -> Result<Self, Self::Error> { in try_from() functions
390 fn try_from(value: u32) -> Result<Self, Self::Error> { in try_from() functions
451 fn try_from(value: u32) -> Result<Self, Self::Error> { in try_from() functions
537 fn try_from(value: u32) -> Result<Self, Self::Error> { in try_from() functions
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() functions
873 FloatingPointMode::try_from( in floating_point_mode()
914 fn try_from(value: u32) -> Result<Self, Self::Error> { try_from() functions
[all...]
/third_party/rust/crates/rust-openssl/openssl/src/
H A 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()
H A 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/minimal-lexical/tests/
H A 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/nix/src/sys/
H A 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()
H A Dselect.rs22 usize::try_from(fd).map_or(false, |fd| fd < FD_SETSIZE), in assert_fd_valid()
/third_party/rust/crates/unicode-ident/generate/src/
H A 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/
H A Dprctl.rs110 fn try_from(value: i32) -> Result<Self, Self::Error> { in try_from() functions
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() functions
894 fn try_from(value: u32) -> Result<Self, Self::Error> { in try_from() functions
/third_party/rust/crates/serde/test_suite/tests/ui/conflict/
H A Dfrom-try-from.rs4 #[serde(from = "u64", try_from = "u64")]
/third_party/rust/crates/serde/test_suite/tests/ui/type-attribute/
H A Dtry_from.rs4 #[serde(try_from = "Option<T")]
/third_party/rust/crates/serde/test_suite/tests/ui/transparent/
H A Dwith_try_from.rs4 #[serde(transparent, try_from = "u64")]
/third_party/rust/crates/nix/test/sys/
H A Dtest_signalfd.rs25 let signo = Signal::try_from(res.ssi_signo as i32).unwrap(); in test_signalfd()
H A Dtest_signal.rs88 let signal = Signal::try_from(signal).unwrap(); in test_sigaction_handler()
/third_party/qrcodegen/rust-no-heap/src/
H A Dlib.rs286 bb.append_bits(u32::try_from(seg.numchars).unwrap(), seg.mode.num_char_count_bits(version)); in encode_segments_to_codewords()
296 bb.append_bits(0, u8::try_from(numzerobits).unwrap()); in encode_segments_to_codewords()
298 bb.append_bits(0, u8::try_from(numzerobits).unwrap()); in encode_segments_to_codewords()
1146 accumdata = accumdata * 45 + u32::try_from(i).unwrap();
/third_party/rust/crates/bindgen/bindgen-tests/tests/expectations/tests/libclang-5/
H A Dobjc_inheritance.rs52 fn try_from(parent: Foo) -> Result<Bar, Self::Error> { in try_from() functions
87 fn try_from(parent: Bar) -> Result<Baz, Self::Error> { in try_from() functions
105 fn try_from(parent: Foo) -> Result<Baz, Self::Error> { in try_from() functions
/third_party/rust/crates/bindgen/bindgen-tests/tests/expectations/tests/libclang-9/
H A Dobjc_inheritance.rs52 fn try_from(parent: Foo) -> Result<Bar, Self::Error> { in try_from() functions
87 fn try_from(parent: Bar) -> Result<Baz, Self::Error> { in try_from() functions
105 fn try_from(parent: Foo) -> Result<Baz, Self::Error> { in try_from() functions
/third_party/rust/crates/nix/test/
H A Dtest_timer.rs16 let signal = Signal::try_from(raw_signal).unwrap(); in handle_sigalarm()
/third_party/rust/crates/memchr/src/memmem/prefilter/
H A Dmod.rs460 rare1i = u8::try_from(i).unwrap(); in new()
463 rare2i = u8::try_from(i).unwrap(); in new()
/third_party/qrcodegen/rust/src/
H A 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/proc-macro2/src/
H A Dfallback.rs1067 let start = u32::try_from(*start).ok()?; in subspan()
1071 let start = u32::try_from(*start).ok()?; in subspan()
1078 let end = u32::try_from(*end).ok()?; in subspan()
1082 let end = u32::try_from(*end).ok()?; in subspan()
/third_party/rust/crates/minimal-lexical/src/
H A Dheapvec.rs32 pub fn try_from(x: &[bigint::Limb]) -> Option<Self> { in try_from() functions
/third_party/rust/crates/codespan/codespan-reporting/examples/
H A Dcustom_files.rs101 let file_id = FileId(u32::try_from(self.files.len()).ok()?); in add()
/third_party/rust/crates/syn/codegen/src/
H A Dhash.rs30 let i = u8::try_from(i).unwrap(); in expand_impl_body()
/third_party/rust/crates/nix/src/
H A Difaddrs.rs74 u8::try_from(mem::size_of::<libc::sockaddr_storage>()).unwrap(); in workaround_xnu_bug()
H A Dmacros.rs136 fn try_from(x: $repr) -> $crate::Result<Self> { in try_from() functions

Completed in 17 milliseconds

12