expedite 0.1.0

Rust Common toolset
Documentation
  • Coverage
  • 0%
    0 out of 56 items documented0 out of 39 items with examples
  • Size
  • Source code size: 15.46 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 3.08 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 15s Average build duration of successful builds.
  • all releases: 15s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • Documentation
  • RustStudy/expedite
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • ZhangHanDong

Rust Common toolset

Time

extern crate expedite;
use expedite::datetime::period::Period;
use expedite::datetime::time::Time;

fn main() {
    let time = Time::now();

    println!("{:?}", time); // Time { date: Date { year: 2017, month: 7, day: 20 }, hours: 16, minutes: 50, seconds: 5, nanos: 470133000 }

    println!(" {:?}", 2.days().from_now()); // Time { date: Date { year: 2017, month: 7, day: 22 }, hours: 16, minutes: 50, seconds: 5, nanos: 470775000 }

    println!(" {:?}", 2.weeks().from_now()); // Time { date: Date { year: 2017, month: 8, day: 3 }, hours: 16, minutes: 50, seconds: 5, nanos: 470798000 }

    println!(" {:?}", 2.months().from_now()); // Time { date: Date { year: 2199522, month: 2, day: 26 }, hours: 16, minutes: 50, seconds: 5, nanos: 470803000 }

    println!(" {:?}", 2.years().from_now()); // Time { date: Date { year: 2019, month: 7, day: 20 }, hours: 16, minutes: 50, seconds: 5, nanos: 470808000 }

    let mut map = hash!{'{' => '}', '[' => ']', '(' => ')'};
    println!("{:?}", map);
}

Macros

  1. Hash Literal
#[macro_use]
extern crate expedite;

fn main() {
  let mut map = hash!{'{' => '}', '[' => ']', '(' => ')'};
  println!("{:?}", map);
}