Skip to main content

write_profile

Function write_profile 

Source
pub fn write_profile(path: &Path, profile: &BandwidthProfile) -> Result<()>
Expand description

Writes profile where read_profile will find it.

Through a temporary file and a rename, because a plain write is not atomic and a reader that catches a half-written profile gets serde’s parse error – which read_profile turns into NO profile, silently discarding a measurement the user did take.