Enum parse_zoneinfo::table::Format
[−]
[src]
pub enum Format {
Constant(String),
Alternate {
standard: String,
dst: String,
},
Placeholder(String),
}The format string to generate a time zone abbreviation from.
Variants
Constant(String)A constant format, which remains the same throughout both standard and DST timespans.
AlternateAn alternate format, such as “PST/PDT”, which changes between standard and DST timespans.
Fields of Alternate
standard: String | Abbreviation to use during Standard Time. |
dst: String | Abbreviation to use during Summer Time. |
Placeholder(String)A format with a placeholder %s, which uses the letters field in
a RuleInfo to generate the time zone abbreviation.
Methods
impl Format[src]
fn new(template: &str) -> Format
Convert the template into one of the Format variants. This can’t
fail, as any syntax that doesn’t match one of the two formats will
just be a ‘constant’ format.
fn format(&self, dst_offset: i64, letters: Option<&String>) -> String
fn format_constant(&self) -> String
Trait Implementations
impl PartialEq for Format[src]
fn eq(&self, __arg_0: &Format) -> bool
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &Format) -> bool
This method tests for !=.
impl Debug for Format[src]
impl Clone for Format[src]
fn clone(&self) -> Format
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from source. Read more