Home
last modified time | relevance | path

Searched refs:try_into (Results 1 – 15 of 15) sorted by relevance

/aosp12/system/security/keystore2/src/
H A Did_rotation.rs109 let mtime = TimeVal::seconds(mtime.as_secs().try_into().unwrap()); in test_had_factory_reset_since_id_rotation()
113 let atime = TimeVal::seconds(atime.as_secs().try_into().unwrap()); in test_had_factory_reset_since_id_rotation()
H A Dlegacy_blob.rs330 buffer[Self::LENGTH_OFFSET..Self::LENGTH_OFFSET + 4].try_into().unwrap(), in new_from_stream()
383 value: BlobValue::Decrypted(value.try_into().context("In new_from_stream.")?), in new_from_stream()
1110 data.try_into() in load_super_key()
1223 &BlobValue::Decrypted(REAL_LEGACY_BLOB_PAYLOAD.try_into().unwrap()) in read_golden_key_blob_test()
1258 assert_eq!(blob.value(), &BlobValue::Decrypted(DECRYPTED_PAYLOAD.try_into().unwrap())); in read_aes_gcm_encrypted_key_blob_test()
1372 assert_eq!(value, BlobValue::Decrypted(LOADED_USRPKEY_NON_AUTHBOUND.try_into()?)); in test_legacy_blobs()
H A Dkey_parameter.rs219 fn try_into(self) -> Result<i64, Self::Error> { in try_into() method
229 fn try_into(self) -> Result<i32, Self::Error> { in try_into() method
239 fn try_into(self) -> Result<Vec<u8>, Self::Error> { in try_into() method
280 <$vtype>::from_primitive(p.try_into()?)
H A Dsecurity_level.rs418 .try_into() in add_required_parameters()
H A Ddatabase.rs382 Ok(Self(SystemTime::now().duration_since(SystemTime::UNIX_EPOCH)?.as_millis().try_into()?)) in now()
416 fn try_into(self) -> Result<SystemTime, Self::Error> { in try_into() method
426 let then_epoch = Duration::from_millis(self.0.try_into()?); in try_into()
447 Ok(Self(t.duration_since(SystemTime::UNIX_EPOCH)?.as_millis().try_into()?)) in try_from()
/aosp12/system/core/libstats/pull_rust/
H A Dstats_pull.rs77 additive_fields.len().try_into().expect("Cannot convert length to i32"), in set_additive_fields()
88 .try_into() in get_additive_fields()
/aosp12/packages/modules/Virtualization/authfs/fd_server/src/
H A Dmain.rs57 offset.try_into().map_err(|_| { in validate_and_cast_offset()
69 size.try_into().map_err(|_| { in validate_and_cast_size()
192 let offset: u64 = offset.try_into().map_err(|_| { in writeFile()
/aosp12/frameworks/native/libs/binder/rust/src/
H A Dparcel.rs122 let len: i32 = slice.len().try_into().or(Err(StatusCode::BAD_VALUE))?; in write_slice_size()
235 let len = len.try_into().unwrap(); in resize_out_vec()
257 let len = len.try_into().unwrap(); in resize_nullable_out_vec()
H A Dproxy.rs325 arg_ptrs.len().try_into().unwrap(), in dump()
/aosp12/frameworks/native/libs/binder/rust/src/parcel/
H A Dparcelable.rs59 slice.len().try_into().or(Err(StatusCode::BAD_VALUE))?, in serialize_array()
294 .try_into()
415 slice.len().try_into().or(Err(StatusCode::BAD_VALUE))?, in serialize_array()
446 slice.len().try_into().or(Err(StatusCode::BAD_VALUE))?, in serialize_array()
481 .try_into() in serialize_option()
/aosp12/system/bt/gd/rust/shim/src/
H A Dmessage_loop_thread.rs77 tokio::time::sleep(Duration::from_millis(delay_ms.try_into().unwrap_or(0))).await; in main_message_loop_thread_do_delayed()
/aosp12/system/bt/gd/rust/linux/stack/src/
H A Dlib.rs52 BDAddr { val: raw_addr.clone().try_into().unwrap() } in from_byte_vec()
/aosp12/system/security/keystore2/src/crypto/
H A Dlib.rs224 let max_size: usize = EVP_MAX_MD_SIZE.try_into().unwrap(); in hkdf_extract()
326 let out_len = result.try_into().unwrap(); in ecdh_compute_key()
/aosp12/packages/modules/Virtualization/authfs/src/fsverity/
H A Deditor.rs288 offset.try_into().map_err(|e| io::Error::new(io::ErrorKind::Other, e))?; in write_at()
299 size.try_into().map_err(|e| io::Error::new(io::ErrorKind::Other, e))?; in resize()
/aosp12/frameworks/native/libs/binder/rust/tests/
H A Dintegration.rs146 match code.try_into()? { in on_transact()