Lines Matching refs:FromPrimitive
411 pub trait FromPrimitive: Sized { interface
416 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()
499 n.to_u64().and_then(FromPrimitive::from_u64) in from_u128()
506 FromPrimitive::from_f64(From::from(n)) in from_f32()
518 Some(i) => FromPrimitive::from_i64(i), in from_f64()
519 None => n.to_u64().and_then(FromPrimitive::from_u64), in from_f64()
527 impl FromPrimitive for $T { impl
652 impl<T: FromPrimitive> FromPrimitive for Wrapping<T> {