From 75f5ce065efb6a186570b365c88e564871915d76 Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Thu, 23 Jul 2020 17:57:59 +0200 Subject: more documentation & adjustments --- src/analyzers/mod.rs | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'src/analyzers/mod.rs') diff --git a/src/analyzers/mod.rs b/src/analyzers/mod.rs index 880e5df..d6315f3 100644 --- a/src/analyzers/mod.rs +++ b/src/analyzers/mod.rs @@ -1,16 +1,23 @@ //! Traits and structures to analyze fights. //! -//! Fights need different logic to determine some data, for example each fight has a different way -//! to determine whether or not the Challenge Mote was activated, whether or not the fight was -//! successful, ... +//! Fights need different logic in order to determine specific data, for example each fight has a +//! different way to determine whether or not the Challenge Mote was activated, whether or not the +//! fight was successful, ... //! -//! This module aims to unify that logic by providing a trait [`Analyzer`][Analyzer], which +//! This module aims to unify that logic by providing the [`Analyzer`][Analyzer] trait, which //! provides a unified interface to query this information. You can use //! [`Log::analyzer`][Log::analyzer] or [`for_log`][for_log] to obtain an analyzer fitting for the //! encounter that is represented by the log. //! +//! Most of the time, you will be dealing with a dynamically dispatched version of +//! [`Analyzer`][Analyzer], that is either `&dyn Analyzer` or `Box`. Also keep in +//! mind that an analyzer keeps a reference to the log that it is analyzing, which can be accessed +//! through [`Analyzer::log`][Analyzer::log]. +//! //! The implementation of the different analyzers is split off in different submodules: //! * [`raids`][raids] for the raid-related encounters. +//! * [`fractals`][fractals] for the fractal-specific encounters. +//! * [`strikes`][strikes] for the strike-mission specific encounters. //! //! Note that you should not create concrete analyzers on your own, as the behaviour is not //! specified when you use a wrong analyzer for the given log. Rely only on @@ -52,6 +59,8 @@ impl Outcome { } /// An [`Analyzer`][Analyzer] is something that implements fight-dependent analyzing of the log. +/// +/// For more information and explanations, see the [module level documentation][self]. pub trait Analyzer { /// Returns a reference to the log being analyzed. fn log(&self) -> &Log; -- cgit v1.2.3