Crate ferrite_config

Source
Expand description

Ferrite Configuration Management

This crate provides a type-safe, validated configuration system for the Ferrite image viewer. It handles configuration loading, saving, and validation through a TOML-based file system.

§Features

  • Type-safe configuration with validation
  • TOML-based storage
  • Standard configuration paths
  • Version tracking for compatibility
  • Comprehensive error handling

§Example

use ferrite_config::FerriteConfig;

// Load existing configuration or create default
let config = FerriteConfig::load().unwrap_or_default();

// Access settings
println!("Window borderless: {}", config.window.borderless);
println!("Zoom level: {}", config.zoom.max_zoom);

Structs§

Enums§

  • Represents all possible errors that can occur in the configuration system. Each variant provides specific context about what went wrong.
  • Represents the corner of a window or display area
  • Re-export eframe types for consistency Keyboard keys.
  • Represents a mouse button

Constants§

Type Aliases§

  • Type alias for Result types using our ConfigError