We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7bfdde2 commit 8c0ad61Copy full SHA for 8c0ad61
cap-time-ext/src/timezone.rs
@@ -4,9 +4,18 @@ use iana_time_zone::get_timezone;
4
/// A reference to a timezone resource.
5
pub struct Timezone(());
6
7
+/// An error type returned by `Timezone::timezone_name`.
8
#[derive(Debug)]
9
pub struct TimezoneError(String);
10
11
+impl std::error::Error for TimezoneError {}
12
+
13
+impl std::fmt::Display for TimezoneError {
14
+ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
15
+ self.0.fmt(f)
16
+ }
17
+}
18
19
impl Timezone {
20
/// Constructs a new instance of `Self`.
21
///
0 commit comments