Struct gfx_device_gl::Version [−][src]
pub struct Version { pub is_embedded: bool, pub major: u32, pub minor: u32, pub revision: Option<u32>, pub vendor_info: &'static str, }
A version number for a specific component of an OpenGL implementation
Fields
is_embedded: bool
major: u32
minor: u32
revision: Option<u32>
vendor_info: &'static str
Implementations
impl Version
[src]
pub fn new(
major: u32,
minor: u32,
revision: Option<u32>,
vendor_info: &'static str
) -> Self
[src]
major: u32,
minor: u32,
revision: Option<u32>,
vendor_info: &'static str
) -> Self
Create a new OpenGL version number
pub fn new_embedded(
major: u32,
minor: u32,
vendor_info: &'static str
) -> Version
[src]
major: u32,
minor: u32,
vendor_info: &'static str
) -> Version
Create a new OpenGL ES version number
pub fn parse(src: &'static str) -> Result<Version, &'static str>
[src]
According to the OpenGL specification, the version information is expected to follow the following syntax:
<major> ::= <number>
<minor> ::= <number>
<revision> ::= <number>
<vendor-info> ::= <string>
<release> ::= <major> "." <minor> ["." <release>]
<version> ::= <release> [" " <vendor-info>]
Note that this function is intentionally lenient in regards to parsing,
and will try to recover at least the first two version numbers without
resulting in an Err
.
Trait Implementations
impl Clone for Version
[src]
impl Copy for Version
[src]
impl Debug for Version
[src]
impl Eq for Version
[src]
impl PartialEq<Version> for Version
[src]
impl StructuralEq for Version
[src]
impl StructuralPartialEq for Version
[src]
Auto Trait Implementations
impl RefUnwindSafe for Version
impl Send for Version
impl Sync for Version
impl Unpin for Version
impl UnwindSafe for Version
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,