Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Configuration

A Config controls how a PReader behaves: where states are stored, whether autosave is on, and how file verification works. Every field has a sensible default, so you only need to set the ones you want to change

In Rust, you create a Config with struct syntax and use ..Config::default() for the rest:

use std::path::PathBuf;
use preader::Config;

let config = Config {
    state_dir: PathBuf::from("/tmp/states"),
    auto_save_state: true,
    ..Config::default()
};

In Python, you use keyword arguments. Unspecified fields keep their defaults:

from preader import Config

config = Config(state_dir="/tmp/states", auto_save_state=True)

The pages below cover every field and their default values across platforms

  • 📋 Fields: All Config fields with types and descriptions
  • 📊 Defaults: Default values, platform-specific paths, iterator option defaults, and constants