pub trait IntTime: Display { // Provided method fn from_unix<T: Time>(&self) -> T where Self: Display { ... } }
Convert an integer into a time struct of choice
use thetime::{System, Ntp, Time, IntTime}; println!("2017 - {:#?}", 1483228800.from_unix::<System>());