m3e/hour

Types

An Hour is a value representing an hour of the day, from 0 to 23.

pub opaque type Hour

Values

pub const default: Hour
pub fn from_string(hour: String) -> Result(Hour, String)

from_string creates an Hour value from a string. This constructor takes a string and returns a Result. It requires the string to be a valid hour, between 0 and 23, inclusive.

pub fn new(hour: Int) -> Result(Hour, String)

new creates an Hour value from an hour. This constructor takes an hour as an Int and returns a Result. It requires the hour to be between 0 and 23, inclusive.

pub fn to_string(h: Hour) -> String

to_string converts an Hour value to a string.

Search Document