Skip to main content

load

Function load 

Source
pub fn load(path: &Path) -> Result<DeviceKeys>
Expand description

Read the roster’s keys, or an empty map when nothing has been issued.

A missing file is the empty map rather than an error: a machine that has never invited anything is not a machine in a bad state.

§Errors

io::Error when the file exists and cannot be read or parsed. A parse failure is not softened into an empty map — that would arm a listener admitting nobody while the roster in settings says otherwise, and the operator would see devices listed and refused at the same time.