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.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Database
impl RefUnwindSafe for Database
impl Send for Database
impl Sync for Database
impl Unpin for Database
impl UnwindSafe for Database
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more