Home
last modified time | relevance | path

Searched refs:to_u64 (Results 1 – 11 of 11) sorted by relevance

/external/rust/crates/num-derive/tests/
Dwith_custom_values.rs50 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()
Dtrivial.rs45 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()
Dissue-6.rs16 assert_eq!(SomeEnum::A.to_u64(), Some(1)); in test_trivial_numeric_casts()
/external/rust/crates/num-traits/src/
Dcast.rs70 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/
Dvalue.rs390 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/
Dcast.rs46 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/
Dlib.rs440 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/
Dbfloat.rs657 fn to_u64(&self) -> Option<u64> { in to_u64() method
658 Self::to_f32(*self).to_u64() in to_u64()
Dbinary16.rs45 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/
Dsparse.rs292 pub fn to_u64(&self) -> Result<SparseDFA<Vec<u8>, u64>> { in to_u64() method
Ddense.rs396 pub fn to_u64(&self) -> Result<DenseDFA<Vec<u64>, u64>> { in to_u64() method