Skip to main content

payload_for

Function payload_for 

Source
pub fn payload_for(notice: &Notice, policy: PushPolicy) -> Option<PushPayload>
Expand description

The notice’s payload under policy, or None for a muted hat (kernel spec §6; Notice’s documented rules):

  • the title: the notice’s generic title under generic_title, else its title;
  • the body: the notice’s detail when details is on and it has one, with generic_title too; otherwise none under generic_title, else the notice’s body.