Home
last modified time | relevance | path

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

123

/external/rust/crates/gdbstub/src/protocol/common/
Dthread_id.rs29 fn try_from(s: &[u8]) -> Result<Self, ()> { in try_from() method
58 fn try_from(s: &[u8]) -> Result<Self, ()> { in try_from() method
70 fn try_from(s: &mut [u8]) -> Result<Self, ()> { in try_from() method
71 Self::try_from(s as &[u8]) in try_from()
78 fn try_from(s: &mut [u8]) -> Result<Self, ()> { in try_from() method
79 Self::try_from(s as &[u8]) in try_from()
/external/adhd/cros_alsa/src/
Dcontrol_tlv.rs169 fn try_from(data: Vec<u32>) -> Result<Self> { in try_from() method
244 Ok(TLV::try_from(tlv_buf)?) in load()
283 assert!(TLV::try_from(tlv_buf).is_ok()); in test_tlv_try_from_raw_vec()
290 assert_eq!(TLV::try_from(tlv_buf).unwrap_err(), Error::InvalidTLV); in test_tlv_length_is_not_multiple_of_sizeof_int()
297 assert_eq!(TLV::try_from(tlv_buf).unwrap_err(), Error::InvalidTLV); in test_tlv_length_larger_than_buff_size()
304 assert_eq!(TLV::try_from(tlv_buf).unwrap_err(), Error::InvalidTLV); in test_tlv_length_less_than_two()
311 assert!(TLV::try_from(tlv_buf).is_ok()); in test_tlv_length_equal_two()
Dcontrol_primitive.rs151 fn try_from(elem_type: u32) -> Result<ElemType> { in try_from() method
322 unsafe { ElemType::try_from(snd_ctl_elem_info_get_type(self.0.as_ptr())) } in elem_type()
/external/rust/crates/rusqlite/src/blob/
Dpos_io.rs46 debug_assert!(i32::try_from(write_start).is_ok() && i32::try_from(buf.len()).is_ok()); in write_at()
135 debug_assert!(i32::try_from(read_start).is_ok()); in raw_read_at()
150 debug_assert!(i32::try_from(buf.len()).is_ok()); in raw_read_at()
151 debug_assert!(i32::try_from(read_len).is_ok()); in raw_read_at()
/external/crosvm/devices/src/virtio/video/decoder/backend/
Dvda.rs19 fn try_from(format: Format) -> Result<Self, Self::Error> { in try_from() method
35 fn try_from(format: Format) -> Result<Self, Self::Error> { in try_from() method
163 libvda::PixelFormat::try_from(format)?, in use_output_buffer()
186 let profile = libvda::Profile::try_from(format)?; in new_session()
/external/rust/crates/ring/src/aead/
Dshift.rs29 <&[u8; BLOCK_LEN]>::try_from(&in_out[(in_prefix_len + i)..][..BLOCK_LEN]).unwrap();
32 let output = <&mut [u8; BLOCK_LEN]>::try_from(&mut in_out[i..][..BLOCK_LEN]).unwrap();
Dquic.rs65 let sample = <&[u8; SAMPLE_LEN]>::try_from(sample)?;
/external/rust/crates/rusqlite/src/
Drow.rs382 fn try_from(row: &'a Row<'a>) -> Result<Self> {
432 |row| <(u32,)>::try_from(row), in test_try_from_row_for_tuple_1()
439 |row| <(u32, u32)>::try_from(row), in test_try_from_row_for_tuple_1()
464 |row| <(u32, u32)>::try_from(row), in test_try_from_row_for_tuple_2()
471 |row| <(u32, u32, u32)>::try_from(row), in test_try_from_row_for_tuple_2()
547 |row| BigTuple::try_from(row), in test_try_from_row_for_tuple_16()
/external/adhd/cros_alsa/cros_alsa_derive/src/
Dcommon.rs37 fn try_from(meta_item: NestedMeta) -> Result<CrosAlsaAttr> { in try_from() method
64 .map(CrosAlsaAttr::try_from) in parse_cros_alsa_attr()
/external/crosvm/devices/src/virtio/
Dmod.rs145 if let Ok(dst_offset) = usize::try_from(dst_offset) { in copy_config()
146 if let Ok(src_offset) = usize::try_from(src_offset) { in copy_config()
/external/crosvm/devices/src/
Dpl030.rs79 let data_array = match <&[u8; 4]>::try_from(data) { in write()
122 let data_array = match <&mut [u8; 4]>::try_from(data) { in read()
/external/rust/crates/tokio/tests/
Dnet_bind_resource.rs13 let _ = TcpListener::try_from(listener); in no_runtime_panics_binding_net_tcp_listener()
/external/rust/crates/unicode-xid/tests/
Dexhaustive_tests.rs8 core::convert::TryFrom::try_from(u) in all_valid_chars()
/external/rust/crates/nix/test/sys/
Dtest_signalfd.rs25 let signo = Signal::try_from(res.ssi_signo as i32).unwrap(); in test_signalfd()
Dtest_signal.rs83 let signal = Signal::try_from(signal).unwrap(); in test_sigaction_handler()
/external/rust/crates/nix/src/sys/
Dwait.rs132 Signal::try_from(libc::WTERMSIG(status)) in term_signal()
144 Signal::try_from(libc::WSTOPSIG(status)) in stop_signal()
Dtermios.rs339 fn try_from(s: libc::speed_t) -> Result<BaudRate> { in try_from() method
1086 fn try_from() { in try_from() function
1087 assert_eq!(Ok(BaudRate::B0), BaudRate::try_from(libc::B0)); in try_from()
1088 assert!(BaudRate::try_from(999999999).is_err()); in try_from()
/external/crosvm/devices/src/virtio/video/
Dmacros.rs14 fn try_from(x: Le32) -> Result<Self, Self::Error> {
Dparams.rs36 fn try_from(
/external/adhd/cras/client/cras-sys/src/
Dlib.rs399 fn try_from(stream_type: u32) -> Result<Self, Self::Error> { in try_from() method
415 fn try_from(client_type: u32) -> Result<Self, Self::Error> { in try_from() method
474 fn try_from(channel: i8) -> Result<Self, Self::Error> { in try_from() method
520 fn try_from(info: audio_stream_debug_info) -> Result<Self, Self::Error> { in try_from() method
/external/rust/crates/parking_lot_core/src/thread_parker/
Dwasm_atomic.rs87 let nanos_left = i64::try_from(left.as_nanos()).unwrap_or(i64::max_value()); in park_until()
/external/rust/crates/tokio/src/net/unix/
Dlistener.rs164 fn try_from(stream: std::os::unix::net::UnixListener) -> io::Result<Self> { in try_from() method
/external/crosvm/sys_util/src/
Dscoped_signal_handler.rs74 if catch_unwind(|| H::handle_signal(Signal::try_from(signum).unwrap())).is_err() { in call_handler()
81 let signal_debug: &dyn fmt::Debug = match Signal::try_from(signum) { in call_handler()
/external/rust/crates/tokio/src/net/tcp/
Dlistener.rs357 fn try_from(stream: net::TcpListener) -> Result<Self, Self::Error> { in try_from() method
/external/rust/crates/tokio/src/signal/
Dwindows.rs38 match DWORD::try_from(id) { in event_info()

123