[−]Struct piston_window::Api
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
pub fn opengl(major: u32, minor: u32) -> Version
Creates a new OpenGL version.
pub fn vulkan(major: u32, minor: u32) -> Version
Creates a new Vulkan version.
pub fn directx(major: u32, minor: u32) -> Version
Creates a new DirectX version.
pub fn metal(major: u32, minor: u32) -> Version
Creates a new Metal version.
pub fn is_opengl(&self) -> bool
Returns true
if the API is OpenGL, false
otherwise.
pub fn is_vulkan(&self) -> bool
Returns true
if the API is Vulkan, false
otherwise.
pub fn is_directx(&self) -> bool
Returns true
if the API is DirectX, false
otherwise.
pub fn is_metal(&self) -> bool
Returns true
if the API is metal, false
otherwise.
Trait Implementations
impl Clone for Version
pub fn clone(&self) -> Version
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for Version
impl Eq for Version
impl Into<Version> for OpenGL
[src]
impl Ord for Version
pub fn cmp(&self, other: &Version) -> Ordering
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<Version> for Version
impl PartialOrd<Version> for Version
pub fn partial_cmp(&self, other: &Version) -> Option<Ordering>
pub fn lt(&self, other: &Version) -> bool
pub fn le(&self, other: &Version) -> bool
pub fn gt(&self, other: &Version) -> bool
pub fn ge(&self, other: &Version) -> bool
impl StructuralEq for Version
impl StructuralPartialEq for Version
Auto Trait Implementations
impl RefUnwindSafe for Version
[src]
impl Send for Version
[src]
impl Sync for Version
[src]
impl Unpin for Version
[src]
impl UnwindSafe for Version
[src]
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> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
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>,