Searched refs:FromPrimitive (Results 1 – 4 of 4) sorted by relevance
411 pub trait FromPrimitive: Sized { trait416 n.to_i64().and_then(FromPrimitive::from_i64) in from_isize()423 FromPrimitive::from_i64(From::from(n)) in from_i8()430 FromPrimitive::from_i64(From::from(n)) in from_i16()437 FromPrimitive::from_i64(From::from(n)) in from_i32()454 n.to_i64().and_then(FromPrimitive::from_i64) in from_i128()461 n.to_u64().and_then(FromPrimitive::from_u64) in from_usize()468 FromPrimitive::from_u64(From::from(n)) in from_u8()475 FromPrimitive::from_u64(From::from(n)) in from_u16()482 FromPrimitive::from_u64(From::from(n)) in from_u32()[all …]
37 pub use cast::{cast, AsPrimitive, FromPrimitive, NumCast, ToPrimitive};
70 fn require_fromprimitive<T: FromPrimitive>(_: &T) {} in wrapping_is_fromprimitive()329 impl<T: FromPrimitive> FromPrimitive for New<T> { in newtype_from_primitive()348 fn check<T: PartialEq + Debug + FromPrimitive>() { in newtype_from_primitive() argument
143 - [The default methods in `FromPrimitive` and `ToPrimitive` are more robust.][73]171 with Rust 1.26, enabled by the new `i128` crate feature. The `FromPrimitive`187 function and the traits `NumCast`, `FromPrimitive`, and `ToPrimitive`.