pub struct HotReloadManager { /* private fields */ }Expand description
Hot reload manager.
Watches for file changes and triggers recompilation/reload.
Implementations§
Source§impl HotReloadManager
impl HotReloadManager
Sourcepub fn new(config: HotReloadConfig) -> Self
pub fn new(config: HotReloadConfig) -> Self
Creates a new hot reload manager.
Sourcepub fn check_for_changes(&mut self) -> bool
pub fn check_for_changes(&mut self) -> bool
Checks for file changes and returns true if a reload is needed.
Call this periodically (e.g., every 100ms) from a background thread.
§Returns
true if files have changed and debounce period has elapsed.
Sourcepub fn reload_node(&self, node_name: &str) -> Result<(), String>
pub fn reload_node(&self, node_name: &str) -> Result<(), String>
Triggers a reload of the specified node.
This is a placeholder - actual implementation would:
- Run
cargo build --release -p aetherdsp-nodes - Load the new .dll/.so/.dylib
- Extract the node factory function
- Create new node instance
- Transfer state from old node to new node
- Swap nodes in the graph
§Arguments
node_name- Name of the node to reload (e.g., “Oscillator”)
§Returns
Ok(()) if reload succeeded, Err otherwise.
Sourcepub fn watched_file_count(&self) -> usize
pub fn watched_file_count(&self) -> usize
Gets the number of files being watched.
Auto Trait Implementations§
impl Freeze for HotReloadManager
impl RefUnwindSafe for HotReloadManager
impl Send for HotReloadManager
impl Sync for HotReloadManager
impl Unpin for HotReloadManager
impl UnsafeUnpin for HotReloadManager
impl UnwindSafe for HotReloadManager
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more