Trait ra_ap_vfs::loader::Handle

source ·
pub trait Handle: Debug {
    // Required methods
    fn spawn(sender: Sender) -> Self
       where Self: Sized;
    fn set_config(&mut self, config: Config);
    fn invalidate(&mut self, path: AbsPathBuf);
    fn load_sync(&mut self, path: &AbsPath) -> Option<Vec<u8>>;
}
Expand description

Interface for reading and watching files.

Required Methods§

source

fn spawn(sender: Sender) -> Self
where Self: Sized,

Spawn a new handle with the given sender.

source

fn set_config(&mut self, config: Config)

Set this handle’s configuration.

source

fn invalidate(&mut self, path: AbsPathBuf)

The file’s content at path has been modified, and should be reloaded.

source

fn load_sync(&mut self, path: &AbsPath) -> Option<Vec<u8>>

Load the content of the given file, returning None if it does not exists.

Implementors§