Searched refs:to_u64 (Results 1 – 11 of 11) sorted by relevance
/external/rust/crates/num-derive/tests/ |
D | with_custom_values.rs | 50 num_renamed::ToPrimitive::to_u64(&Color::Red), in test_to_primitive_for_enum_with_custom_value() 51 num_renamed::ToPrimitive::to_u64(&Color::Blue), in test_to_primitive_for_enum_with_custom_value() 52 num_renamed::ToPrimitive::to_u64(&Color::Green), in test_to_primitive_for_enum_with_custom_value() 53 num_renamed::ToPrimitive::to_u64(&Color::Alpha), in test_to_primitive_for_enum_with_custom_value() 65 .map(|x| x.and_then(|x| num_renamed::ToPrimitive::to_u64(&x))) in test_reflexive_for_enum_with_custom_value()
|
D | trivial.rs | 45 num_renamed::ToPrimitive::to_u64(&Color::Red), in test_to_primitive_for_trivial_case() 46 num_renamed::ToPrimitive::to_u64(&Color::Blue), in test_to_primitive_for_trivial_case() 47 num_renamed::ToPrimitive::to_u64(&Color::Green), in test_to_primitive_for_trivial_case() 59 .map(|x| x.and_then(|x| num_renamed::ToPrimitive::to_u64(&x))) in test_reflexive_for_trivial_case()
|
D | issue-6.rs | 16 assert_eq!(SomeEnum::A.to_u64(), Some(1)); in test_trivial_numeric_casts()
|
/external/rust/crates/num-traits/src/ |
D | cast.rs | 70 self.to_u64().as_ref().and_then(ToPrimitive::to_usize) in to_usize() 77 self.to_u64().as_ref().and_then(ToPrimitive::to_u8) in to_u8() 84 self.to_u64().as_ref().and_then(ToPrimitive::to_u16) in to_u16() 91 self.to_u64().as_ref().and_then(ToPrimitive::to_u32) in to_u32() 96 fn to_u64(&self) -> Option<u64>; in to_u64() method 109 self.to_u64().map(From::from) in to_u128() 131 None => self.to_u64().as_ref().and_then(ToPrimitive::to_f64), in to_f64() 185 fn to_u64 -> u64; 258 fn to_u64 -> u64; 385 fn to_u64 -> u64; [all …]
|
/external/rust/crates/log/src/kv/ |
D | value.rs | 390 to_u64 -> u64, 505 assert_eq!(Some(42u64), Value::capture_display(&42).to_u64()); in test_capture_fmt() 506 assert_eq!(Some(42u64), Value::capture_debug(&42).to_u64()); in test_capture_fmt() 508 assert!(Value::from_display(&42).to_u64().is_none()); in test_capture_fmt() 509 assert!(Value::from_debug(&42).to_u64().is_none()); in test_capture_fmt() 524 assert_eq!(Some(42u64), Value::capture_serde(&42).to_u64()); in test_capture_serde() 526 assert_eq!(Some(42u64), Value::from_serde(&42).to_u64()); in test_capture_serde() 532 assert_eq!(Some(42u64), Value::capture_sval(&42).to_u64()); in test_capture_sval() 534 assert_eq!(Some(42u64), Value::from_sval(&42).to_u64()); in test_capture_sval() 569 assert!(v.to_u64().is_some()); in test_to_number() [all …]
|
/external/rust/crates/num-traits/tests/ |
D | cast.rs | 46 assert_eq!(i.to_u64(), w.to_u64()); in wrapping_to_primitive() 372 fn to_u64(&self) -> Option<u64> { in newtype_to_primitive() method 373 self.0.to_u64() in newtype_to_primitive() 388 assert_eq_to!(to_u8 to_u16 to_u32 to_u64 to_usize); in newtype_to_primitive()
|
/external/rust/crates/num-derive/src/ |
D | lib.rs | 440 fn to_u64(&self) -> Option<u64> { in to_primitive() 441 <#inner_ty as #import::ToPrimitive>::to_u64(&self.0) in to_primitive() 542 fn to_u64(&self) -> Option<u64> { in to_primitive()
|
/external/rust/crates/half/src/ |
D | bfloat.rs | 657 fn to_u64(&self) -> Option<u64> { in to_u64() method 658 Self::to_f32(*self).to_u64() in to_u64()
|
D | binary16.rs | 45 fn to_u64(&self) -> Option<u64> { in to_u64() method 46 Self::to_f32(*self).to_u64() in to_u64()
|
/external/rust/crates/regex-automata/src/ |
D | sparse.rs | 292 pub fn to_u64(&self) -> Result<SparseDFA<Vec<u8>, u64>> { in to_u64() method
|
D | dense.rs | 396 pub fn to_u64(&self) -> Result<DenseDFA<Vec<u64>, u64>> { in to_u64() method
|