Skip to content

Commit

Permalink
Add documentation for ChronoDateConversionError and make type public
Browse files Browse the repository at this point in the history
  • Loading branch information
AlvaroSierra committed Jan 31, 2025
1 parent 318139d commit ce98b69
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/field/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -408,8 +408,9 @@ impl From<time::Date> for Date {
}
}

/// An error representing a conversion error from [`chrono::NaiveDate`] to [`Date`] when conversion
/// fails if year > 9999 or year < 0.
#[cfg(feature = "chrono")]
/// An error representing
#[derive(Debug, PartialEq)]
pub struct ChronoDateConversionError;

Expand Down
3 changes: 3 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,9 @@ pub use crate::reading::{
pub use crate::record::Record;
pub use crate::writing::{FieldWriter, TableWriter, TableWriterBuilder, WritableRecord};

#[cfg(feature = "chrono")]
pub use crate::field::types::ChronoDateConversionError;

/// macro to define a struct that implements the ReadableRecord and WritableRecord
///
/// # Examples
Expand Down

0 comments on commit ce98b69

Please sign in to comment.