pub trait SyncSource {
// Required methods
fn capabilities(&self) -> SourceCapabilities;
fn enumerate(&mut self) -> Result<Vec<SourceEntry>>;
fn fetch(&mut self, path: &str) -> Result<Option<SourceItem>>;
// Provided methods
fn write(&mut self, _path: &str, _content: &str) -> Result<()> { ... }
fn remove(&mut self, _path: &str) -> Result<()> { ... }
fn watch(&mut self) -> Result<Receiver<Vec<String>>> { ... }
fn unwatch(&mut self) -> Result<()> { ... }
fn close(&mut self) -> Result<()> { ... }
}Expand description
The in-engine handle to a source.
Required Methods§
fn capabilities(&self) -> SourceCapabilities
Sourcefn enumerate(&mut self) -> Result<Vec<SourceEntry>>
fn enumerate(&mut self) -> Result<Vec<SourceEntry>>
The full current scope.
Provided Methods§
Sourcefn write(&mut self, _path: &str, _content: &str) -> Result<()>
fn write(&mut self, _path: &str, _content: &str) -> Result<()>
Persist engine-authored bytes (write-through sources only).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".