Crate naviz_repository

Repository for loading configs. Also contains bundled configs.

Modules

Functions

Try to parse a Config from the passed bytes

Structs and Unions

A repository of config files.

Implementations

Functions

Loads the bundled machines into the passed Repository

Loads the bundles styles into the passed Repository

Creates a new empty repository

Tries to get the contents of the entry with the passed id as some Config.

Returns:

  • None: No entry with the passed id exists

  • Some(Err): An entry exists, but failed to load the data or failed to convert to C

  • Some(Ok): The config of the found entry

Tries to get the raw contents of the entry with the passed id.

Returns:

  • None: No entry with the passed id exists

  • Some(Err): An entry exists, but failed to load the data

  • Some(Ok): The data of the found entry

Checks whether the repository has an entry with id

Import a machine into the user-directory. Will validate that the config can be parsed into a valid MachineConfig.

Import a style into the user-directory. Will validate that the config can be parsed into a valid VisualConfig.

The list of entries of this repository: (id, name, removable)-pairs

Delete an imported config from the user dir.

Try to get any config from this repository

Loads the machines from the user-directory into the passed Repository

Loads the styles from the user-directory into the passed Repository