Releases: neoncitylights/arxiv
Releases · neoncitylights/arxiv
v1.0.1 (2024-11-06)
Released a hotfix to enable documentation to be generated on docs.rs.
v1.0.0 (2024-11-06)
1.0.0
This version marks the first stable release of the library. The API has been significantly reworked since the initial release to be more idiomatic. The dependency for handling dates was switched from the time
crate to the jiff
crate, and the MSRV has been bumped to 1.70.0 to align with the jiff
crate.
Documentation
- Fixed a typo in the summary of the
ArticleIdError::InvalidId
variant
Bug fixes
- Fix
ArticleId
's implementation ofDisplay
to conditionally include the version number within the formatted string (depending on if it's the latest version or a specific version) - Fix
ArticleId::try_new()
to check if the given number string is all ASCII digits - Fix
ArticleId::try_new()
to returnArticleIdError::InvalidYear
/ArticleIdError::InvalidMonth
for invalid year/months instead ofArticleIdError::Syntax
for either
Features
- Introduce
ArticleVersion
enum - Introduce
ArticleIdError::ExpectedBeginningLiteral
,ArticleIdError::ExpectedNumberVv
variants - implement
Copy
for:ArticleId
,CategoryId
,Stamp
- implement
TryFrom<&'a str>
for:ArticleId
,CategoryId
,Stamp
Archive
: addcontains_subjects()
methodArticleId
: makenumber
andversion
fields publicArticleId
: addnew()
andnew_latest()
methods (replacingnew_unchecked()
andnew_unchecked_latest()
respectively)ArticleId
: addas_unique_ident()
method, which returns a unique identifier for the arXiv article in the form of "YYMM.NNNNN"CategoryId
: addparse_bracketed()
methodStamp
: make all fields public- Introduce a crate feature
url
. This optionally installs the "url" dependency, and allows creating aurl::Url
instance from anArchive
orArticleId
via:impl<'a> From<Archive> for url::Url
,Archive::as_url()
impl<'a> From<ArticleId<'a>> for url::Url
,ArticleId::as_url()
Breaking changes
- MSRV: Bumps the minimum supported Rust version from 1.63.0 to 1.70.0, since jiff 0.1.14 requires 1.70.0
- Migrate date handling from the time crate to the jiff crate
- Rename
ArxivArchive
toArchive
- Rename
ArxivId
toArticleId
- Rename
ArxivIdError
toArticleIdError
- Rename
ArxivIdResult
toArticleIdResult
- Rename
ArxivIdScheme
toArticleIdScheme
- Rename
ArxivCategoryId
toCategory
- Rename
ArxivGroup
toGroup
- Rename
ArxivStamp
toStamp
- Rename
ArxivStampError
toStampError
- Rename
ArxivStampResult
toStampResult
ArticleIdError
: now marked with#[non_exhaustive]
ArticleIdError
: removedArticleIdError::Syntax
variantStampError
: now marked with#[non_exhaustive]
StampError
: theInvalidDate
variant no longer contains any associated data- Due to lifetimes, remove implementation of
FromStr
for:ArticleId
,CategoryId
,Stamp
ArticleId
: changenumber
field type fromString
to&'a str
ArticleId
: changeyear
field type fromu16
toi16
to sync with jiffArticleId
: changemonth
field type fromu8
toi8
to sync with jiffArticleId
: changeMIN_YEAR
,MAX_YEAR
constants fromu16
toi16
to sync with jiffArticleId
: madeMIN_MONTH
,MAX_MONTH
constants privateArticleId
: changeversion
field type fromOption<u8>
toArticleVersion
ArticleId
: removenew_unchecked()
andnew_unchecked_latest()
Stamp
: changecategory
field type fromOption<ArxivCategoryId>
toCategoryId<'a>
Stamp
: remove all getter methods (since fields are now public)Stamp
:submitted
field now usesjiff::civil::Date
instead oftime::Date
CategoryId
: changesubject
field type fromString
to&'a str
Internal
- Cleaned up implementation of
Display
forArxivStamp
.