pub trait Count {
// Required method
fn to_count(&self) -> i64;
}Expand description
A number Translation::count accepts: every integer type, and references to them.
References are accepted because askama passes template fields by
reference. Values outside the i64 range count as i64::MAX.
§Examples
use ocre::i18n::Count;
assert_eq!(3_usize.to_count(), 3);
assert_eq!((&-2_i32).to_count(), -2);
assert_eq!(u64::MAX.to_count(), i64::MAX);Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".