diff options
Diffstat (limited to 'src/baas.rs')
-rw-r--r-- | src/baas.rs | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/baas.rs b/src/baas.rs index 36a7aad..938b4c4 100644 --- a/src/baas.rs +++ b/src/baas.rs @@ -1,4 +1,4 @@ -//! Functions to manipulate the global Minetest installation. +//! This module contains functions to query & manipulate the global Minetest installation. use std::{collections::HashMap, path::PathBuf}; use dirs; @@ -191,7 +191,8 @@ impl Baas { /// Snapshot of a [`Baas`] scan. /// -/// Every item is indexed by its ID/name. +/// A snapshot is created through the [`Baas::snapshot`] method and gives a frozen view on the +/// installed objects. #[derive(Debug, Clone)] pub struct Snapshot { worlds: HashMap<String, World>, @@ -200,14 +201,23 @@ pub struct Snapshot { } impl Snapshot { + /// Return all worlds that were found. + /// + /// The map maps the world's name to the [`World`] object. pub fn worlds(&self) -> &HashMap<String, World> { &self.worlds } + /// Return all games that were found. + /// + /// The map maps the game ID to the [`Game`] object. pub fn games(&self) -> &HashMap<String, Game> { &self.games } + /// Return the available mods that were found. + /// + /// The map maps the mod name to the [`MineMod`] object. pub fn mods(&self) -> &HashMap<String, MineMod> { &self.mods } |