Struct live_reload::Reloadable [] [src]

pub struct Reloadable<Host> { /* fields omitted */ }

A Reloadable represents a handle to library that can be live reloaded.

Methods

impl<Host> Reloadable<Host>
[src]

Create a new Reloadable library.

This takes the path to a dynamic library containing a RELOAD_API symbol that exports the functions needed for live reloading. In order to define this symbol in your own reloadable libraries, see the live_reload! macro. This will load the library and initialize a filesystem watcher pointing to the file in order to know when the library has changed.

Reload the library if it has changed, otherwise do nothing.

This will consult with the filesystem watcher, and if the library has been recreated or updated, it will reload the library. See reload_now for details on what happens when a library is reloaded.

Immediately reload the library without checking whether it has changed.

This first calls unload on the currently loaded library, then unloads the dynamic library. Next, it loads the new dynamic library, and calls reload on that. If the new library fails to load, this method will return an Err and the Reloadable will be left with no library loaded.

Call the update method on the library.

If no library is currently loaded, this does nothing and returns ShouldQuit::No.

Get a reference to the Host struct>

Get a mutable reference to the Host struct.

Trait Implementations

impl<Host> Drop for Reloadable<Host>
[src]

A method called when the value goes out of scope. Read more