lits 0.3.1

A proc-macro collection that parses human-readable literals at compile time.
Documentation
1
2
3
4
5
6
7
8
9
10
use std::time::{Duration, UNIX_EPOCH};

fn main() {
  assert_eq!(
    lits::datetime!("1970-01-01T00:00:00Z")
      .duration_since(UNIX_EPOCH)
      .unwrap(),
    Duration::from_secs(0)
  );
}