pub fn datetime_frac_from_int(year: usize, month: usize, day: usize, hour: usize, minute: usize, second: usize, frac: usize) -> Result<Value<'a>, TOMLError> {
    let y = format!("{:0>4}", year);
    let m = format!("{:0>2}", month);
    let d = format!("{:0>2}", day);
    let h = format!("{:0>2}", hour);
    let min = format!("{:0>2}", minute);
    let s = format!("{:0>2}", second);
    let f = format!("{}", frac);
    match Date::from_str(y, m, d) {
      Ok(date) => {
        match Time::from_str(h, min, s, Some(f), None) {
          Ok(time) => Ok(Value::DateTime(DateTime::new(date, Some(time)))),
          Err(error) => Err(error),
        }
      },
      Err(error) => Err(error),
    }
  }
/// Convenience function for creating a `Value::DateTime` containing a date and time with fractional seconds from
/// integer values. Returns `Ok(DateTime)` on success and `Err(TOMLError)` on failure. Note, you can't represent
/// leading zeros on the fractional part this way for example: `2016-03-15T08:05:22.00055` is not possible using this
/// function.
///
/// # Examples
///
/// ```
/// use tomllib::types::{Value, DateTime, Date, Time};
///
/// assert_eq!(Value::DateTime(DateTime::new(Date::from_str("2010", "04", "10").unwrap(),
///   Some(Time::from_str("01", "02", "03", Some("5432".into()), None).unwrap()))),
///   Value::datetime_frac_from_int(2010, 4, 10, 1, 2, 3, 5432).unwrap());
/// ```
Convenience function for creating a `Value::DateTime` containing a date and time with fractional seconds from
integer values.
Convenience function for creating a ` Value :: DateTime ` containing a date and time with fractional seconds from integer values .
pub fn datetime_frac_from_int(year: usize, month: usize, day: usize, hour: usize, minute: usize, second: usize, frac: usize) -> Result<Value<'a>, TOMLError> {
    let y = format!("{:0>4}", year);
    let m = format!("{:0>2}", month);
    let d = format!("{:0>2}", day);
    let h = format!("{:0>2}", hour);
    let min = format!("{:0>2}", minute);
    let s = format!("{:0>2}", second);
    let f = format!("{}", frac);
    match Date::from_str(y, m, d) {
      Ok(date) => {
        match Time::from_str(h, min, s, Some(f), None) {
          Ok(time) => Ok(Value::DateTime(DateTime::new(date, Some(time)))),
          Err(error) => Err(error),
        }
      },
      Err(error) => Err(error),
    }
  }
pub fn datetime_frac_from_int ( year : usize , month : usize , day : usize , hour : usize , minute : usize , second : usize , frac : usize ) -> Result < Value < ' a > , TOMLError > { let y = format ! ( " " year ) ; let m = format ! ( " " month ) ; let d = format ! ( " " day ) ; let h = format ! ( " " hour ) ; let min = format ! ( " " minute ) ; let s = format ! ( " " second ) ; let f = format ! ( " " frac ) ; match Date :: from_str ( y , m , d ) { Ok ( date ) => { match Time :: from_str ( h , min , s , Some ( f ) , None ) { Ok ( time ) => Ok ( Value :: DateTime ( DateTime :: new ( date , Some ( time ) ) ) ) , Err ( error ) => Err ( error ) , } } , Err ( error ) => Err ( error ) , } }
Convenience function for creating a `Value::DateTime` containing a date and time with fractional seconds from
integer values.
Convenience function for creating a ` Value :: DateTime ` containing a date and time with fractional seconds from integer values .
year
usize
month
usize
day
usize
hour
usize
minute
usize
second
usize
frac
usize
year
usize
month
usize
day
usize
hour
usize
minute
usize
second
usize
frac
usize
examples
```
use tomllib::types::{Value, DateTime, Date, Time}.


` ` ` use tomllib :: types :: { Value DateTime Date Time } .