rust_releases_rust_changelog/
errors.rs1use rust_releases_core::Channel;
2
3pub type RustChangelogResult<T> = Result<T, RustChangelogError>;
5
6#[derive(Debug, thiserror::Error)]
8#[non_exhaustive]
9pub enum RustChangelogError {
10 #[error("Channel {0} is not available for the 'RustChangelog' source type")]
12 ChannelNotAvailable(Channel),
13
14 #[error("Unable to parse release date in a release entry '{0}': {1}")]
16 TimeParseError(String, time::error::Parse),
17
18 #[error("Unable to find a valid release date in a release entry")]
20 NoDateInChangelogItem,
21
22 #[error("Unable to find a valid version in a release entry")]
24 NoVersionInChangelogItem,
25
26 #[error(transparent)]
28 BaseCacheDir(#[from] rust_releases_io::BaseCacheDirError),
29
30 #[error(transparent)]
32 CachedClient(#[from] rust_releases_io::CachedClientError),
33
34 #[error(transparent)]
36 IsStale(#[from] rust_releases_io::IsStaleError),
37
38 #[error("{0}, input was: {1}")]
40 SemverError(rust_releases_core::semver::Error, String),
41
42 #[error(transparent)]
44 UnrecognizedText(#[from] std::str::Utf8Error),
45}