pub struct FlighthookConfig {
pub default_units: UnitSystem,
pub chipping_clubs: Vec<Club>,
pub putting_clubs: Vec<Club>,
pub webserver: HashMap<String, WebserverSection>,
pub mevo: HashMap<String, MevoSection>,
pub r10: HashMap<String, R10Section>,
pub mock_monitor: HashMap<String, MockMonitorSection>,
pub gspro: HashMap<String, GsProSection>,
pub random_club: HashMap<String, RandomClubSection>,
}Expand description
Top-level persisted config. All fields are in user-friendly units (inches, feet, 0-100 percent) so the TOML file is hand-editable.
Fields§
§default_units: UnitSystemDefault unit system for shot display (freedom units by default)
chipping_clubs: Vec<Club>Clubs that trigger Chipping mode on selection.
putting_clubs: Vec<Club>Clubs that trigger Putting mode on selection.
webserver: HashMap<String, WebserverSection>§mevo: HashMap<String, MevoSection>§r10: HashMap<String, R10Section>§mock_monitor: HashMap<String, MockMonitorSection>§gspro: HashMap<String, GsProSection>§random_club: HashMap<String, RandomClubSection>Implementations§
Source§impl FlighthookConfig
impl FlighthookConfig
Sourcepub fn club_mode(&self, club: Club) -> ShotDetectionMode
pub fn club_mode(&self, club: Club) -> ShotDetectionMode
Look up the detection mode for a club based on the configured mapping.
Clubs in putting_clubs → Putting, in chipping_clubs → Chipping,
everything else → Full.
Sourcepub fn has_user_actors(&self) -> bool
pub fn has_user_actors(&self) -> bool
Returns true if any user-configured actors (devices or integrations) exist. Webservers are infrastructure and don’t count.
Trait Implementations§
Source§impl Clone for FlighthookConfig
impl Clone for FlighthookConfig
Source§fn clone(&self) -> FlighthookConfig
fn clone(&self) -> FlighthookConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FlighthookConfig
impl Debug for FlighthookConfig
Source§impl Default for FlighthookConfig
impl Default for FlighthookConfig
Source§impl<'de> Deserialize<'de> for FlighthookConfig
impl<'de> Deserialize<'de> for FlighthookConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for FlighthookConfig
impl PartialEq for FlighthookConfig
Source§impl Serialize for FlighthookConfig
impl Serialize for FlighthookConfig
impl StructuralPartialEq for FlighthookConfig
Auto Trait Implementations§
impl Freeze for FlighthookConfig
impl RefUnwindSafe for FlighthookConfig
impl Send for FlighthookConfig
impl Sync for FlighthookConfig
impl Unpin for FlighthookConfig
impl UnsafeUnpin for FlighthookConfig
impl UnwindSafe for FlighthookConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more