INNER CODE UNIT · Rust
new
mtkennerly/ludusavi · src/api.rs:33
pub fn new(config: Config, manifest: Manifest) -> Self {
let (layout, title_finder, steam_shortcuts) = Self::make_state(&config, &manifest);
Self {
config,
manifest,
layout,
title_finder,
steam_shortcuts,
}
}
pub fn load() -> Result<Self, Error> {
let config = Config::load()?;
let manifest = Manifest::load()?;
Ok(Self::new(config, manifest))
}