Struct opengl_registry::Registry
source · pub struct Registry { /* private fields */ }
Expand description
Representation of the OpenGL registry.
Implementations§
source§impl Registry
impl Registry
sourcepub fn retrieve() -> Result<Registry, RegistryError>
Available on crate feature include-xml
only.
pub fn retrieve() -> Result<Registry, RegistryError>
include-xml
only.Retrieves the OpenGL registry from a included XML file.
Errors
Returns Err
if parsing fails in any way.
sourcepub fn retrieve_from_bytes(xml_bytes: &[u8]) -> Result<Registry, RegistryError>
pub fn retrieve_from_bytes(xml_bytes: &[u8]) -> Result<Registry, RegistryError>
sourcepub fn retrieve_from_file(
xml_file: &mut File
) -> Result<Registry, RegistryError>
pub fn retrieve_from_file( xml_file: &mut File ) -> Result<Registry, RegistryError>
Retrieves the OpenGL registry from a XML file.
Errors
Returns Err
if:
- Parsing fails in any way.
- An I/O error occurs.
sourcepub fn new(commands: impl IntoIterator<Item = Command>) -> Self
pub fn new(commands: impl IntoIterator<Item = Command>) -> Self
Creates a new Registry
.
Note
This will NOT use anything from the actual OpenGL registry. Use the
Registry::retrieve
method for that.