webpush/urgency

Types

Represents the urgency level for a web push notification.

  • VeryLow: Indicates the lowest urgency.
  • Low: Indicates a low urgency.
  • Normal: Indicates a normal urgency.
  • High: Indicates the highest urgency.
pub type Urgency {
  VeryLow
  Low
  Normal
  High
}

Constructors

  • VeryLow
  • Low
  • Normal
  • High

Values

pub fn from_string(s: String) -> Result(Urgency, Nil)

Parse a wire-format string into Urgency. Returns Ok(Urgency) for allowed values, or Error(Nil) otherwise.

pub fn is_valid_urgency(s: String) -> Bool

Checking allowable values for the urgency header (string form).

pub fn to_string(u: Urgency) -> String

Convert an Urgency value to the wire-format string.

Search Document