Skip to main content

encode_sleep

Function encode_sleep 

Source
pub fn encode_sleep(sleep: &Sleep) -> Value
Expand description

Encodes a sleep request as the sentinel completion output.

The instant is normalized to UTC before it is formatted, so a tool that returns wake_at in some other offset records the same instant every other recorded instant in the log is written in, and the value decoded back is the value the run sleeps on. It also removes the one way RFC 3339 formatting can fail on a representable instant (an offset carrying seconds), which is what lets this return a Value rather than a Result.