pub struct Database { /* private fields */ }
Expand description
Describes all the VCP feature codes supported by an MCCS specification or display.
Implementations§
source§impl Database
impl Database
sourcepub fn from_version(mccs_version: &Version) -> Self
pub fn from_version(mccs_version: &Version) -> Self
Create a new database from a specified MCCS specification version.
sourcepub fn from_database<R: Read>(
database_yaml: R,
mccs_version: &Version
) -> Result<Self>
pub fn from_database<R: Read>( database_yaml: R, mccs_version: &Version ) -> Result<Self>
Create a new database from a specified database description YAML file.
This format is not (yet) documented, but an example exists that describes the MCCS spec.
sourcepub fn apply_capabilities(&mut self, caps: &Capabilities)
pub fn apply_capabilities(&mut self, caps: &Capabilities)
Filter out any feature codes or values that are not supported by the specified display.
sourcepub fn get(&self, code: FeatureCode) -> Option<&Descriptor>
pub fn get(&self, code: FeatureCode) -> Option<&Descriptor>
Get the description of a given VCP feature code.