oxedyne/fe2o3/fe2o3_datime/src/core/duration.rs
483 bytes, 8 runs
created by r1870400018:6345, which is this file's identity for as long as the history lasts, whatever it is later renamed to
download · who wrote it · its history
| 1 | //! [Written with AI entirely](https://need2know.ai/entirely-ai/code)\ |
| 2 | //! Anthropic Claude |
| 3 | |
| 4 | use oxedyne_fe2o3_core::prelude::*; |
| 5 | |
| 6 | use std::fmt::Debug; |
| 7 | |
| 8 | pub trait Duration: Debug + Clone { |
| 9 | fn to_nanos(&self) -> Outcome<i64>; |
| 10 | fn to_seconds(&self) -> Outcome<i64>; |
| 11 | fn to_days(&self) -> Outcome<i32>; |
| 12 | fn is_negative(&self) -> bool; |
| 13 | } |
| 14 | |
| 15 | #[derive(Clone, Debug, PartialEq)] |
| 16 | pub struct AbstractDuration; |
| 17 | |
| 18 | impl AbstractDuration { |
| 19 | pub fn new() -> Self { |
| 20 | Self |
| 21 | } |
| 22 | } |