FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    FileWatcher

    struct · ferroui-hot-reload · v0.5.0

    struct FileWatcher
    

    View source

    Members

    changes

    changes: std::sync::mpsc::Receiver<FileBatch>
    

    Source

    new

    fn new(files: BTreeMap<String, PathBuf>, interval: Duration) -> Self
    

    Files map canonical document URI to source path. Two identical reads debounce partial saves.

    Source

    with_baseline

    fn with_baseline(files: BTreeMap<String, PathBuf>, interval: Duration, baseline: BTreeMap<String, String>) -> Self
    

    Start from the exact source snapshot loaded by the caller, avoiding a startup race when an editor saves before the worker takes its first sample.

    Source

    with_directories

    fn with_directories(files: BTreeMap<String, PathBuf>, directories: Vec<WatchDirectory>, interval: Duration, baseline: BTreeMap<String, String>) -> Self
    

    Discover XAML files recursively as well as watching the original manifest paths. New documents still require session admission; discovery never silently establishes a new compiled compatibility baseline.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • Borrow<T>
    • BorrowMut<T>
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ClassDefaults
    • ErasedDestructor
    • IntoEither
    • Drop

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.