Struct graphics_api_version::Version [−][src]
Stores graphics API version.
Fields
api: Cow<'static, str>
A string identifying the API.
major: u32
Major version.
minor: u32
Minor version.
Implementations
impl Version
[src][−]
pub fn opengl(major: u32, minor: u32) -> Version
[src][−]
Creates a new OpenGL version.
pub fn vulkan(major: u32, minor: u32) -> Version
[src][−]
Creates a new Vulkan version.
pub fn directx(major: u32, minor: u32) -> Version
[src][−]
Creates a new DirectX version.
pub fn metal(major: u32, minor: u32) -> Version
[src][−]
Creates a new Metal version.
pub fn is_opengl(&self) -> bool
[src][−]
Returns true
if the API is OpenGL, false
otherwise.
pub fn is_vulkan(&self) -> bool
[src][−]
Returns true
if the API is Vulkan, false
otherwise.
pub fn is_directx(&self) -> bool
[src][−]
Returns true
if the API is DirectX, false
otherwise.
pub fn is_metal(&self) -> bool
[src][−]
Returns true
if the API is metal, false
otherwise.
Trait Implementations
impl Clone for Version
[src][+]
impl Debug for Version
[src][+]
impl Eq for Version
[src]
impl Ord for Version
[src][+]
impl PartialEq<Version> for Version
[src][+]
impl PartialOrd<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,
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,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,