pub trait AbstractData {
// Required methods
fn spec_type(&self, path: &Path) -> Option<SpecType>;
fn get(&self, path: &Path, field: &Token) -> Option<Value>;
fn list(&self, path: &Path) -> Vec<&Token>;
fn visit_specs(&self) -> Vec<&Path>;
}Expand description
Interface for scene description data storage.
Required Methods§
Sourcefn get(&self, path: &Path, field: &Token) -> Option<Value>
fn get(&self, path: &Path, field: &Token) -> Option<Value>
Return the value for the given path and field.
Sourcefn list(&self, path: &Path) -> Vec<&Token>
fn list(&self, path: &Path) -> Vec<&Token>
Return the names of all the fields that are set at path.
Sourcefn visit_specs(&self) -> Vec<&Path>
fn visit_specs(&self) -> Vec<&Path>
Visit every spec in this AbstractData object in arbitrary order.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".