Skip to content

Commit

Permalink
Minor doc improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
sbarral committed Apr 4, 2024
1 parent 36bf8e2 commit 7ae71b9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ pub enum DateTimeError {
InvalidSecond(u8),
/// The nanosecond field value is more than 999 999 999.
InvalidNanosecond(u32),
/// This date-time value cannot be represented as a TAI timestamp with the
/// specified epoch.
OutOfRange,
}

Expand Down
9 changes: 5 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -497,10 +497,11 @@ impl<const EPOCH_REF: i64> TaiTime<EPOCH_REF> {
/// Returns an error if any of the arguments is invalid, or if the
/// calculated timestamp is outside the representable range.
///
/// While highly improbable, this method will also return an error on
/// arithmetic overflow. This would require `EPOCH_REF` to approach
/// `i64::MIN` or `i64::MAX`, which corresponds to approximately ±292
/// billion years.
/// While highly improbable, this method will also return a
/// `DateTimeError::OutOfRange` error on arithmetic overflow. This would
/// require `EPOCH_REF` to approach `i64::MIN` or `i64::MAX`, which
/// corresponds to approximately ±292 billion years. This cannot happen with
/// any of the pre-defined `TaiTime` aliases.
///
///
/// # Example
Expand Down

0 comments on commit 7ae71b9

Please sign in to comment.