Skip to main content

AbstractData

Trait AbstractData 

Source
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§

Source

fn spec_type(&self, path: &Path) -> Option<SpecType>

Return the type of the spec at path.

Source

fn get(&self, path: &Path, field: &Token) -> Option<Value>

Return the value for the given path and field.

Source

fn list(&self, path: &Path) -> Vec<&Token>

Return the names of all the fields that are set at path.

Source

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".

Implementors§