pub struct GlassesViewport { /* private fields */ }Expand description
Side-by-side viewport dimensions advertised by glasses surface capabilities.
Implementations§
Source§impl GlassesViewport
impl GlassesViewport
Sourcepub fn from_caps(caps: &SurfaceCaps) -> Result<Self>
pub fn from_caps(caps: &SurfaceCaps) -> Result<Self>
Reads per-eye dimensions from a glasses SurfaceCaps display map.
§Errors
Returns an error when per-eye-px is absent or malformed.
Sourcepub fn per_eye_px(self) -> [u32; 2]
pub fn per_eye_px(self) -> [u32; 2]
Returns [width, height] for one eye.
Trait Implementations§
Source§impl Clone for GlassesViewport
impl Clone for GlassesViewport
Source§fn clone(&self) -> GlassesViewport
fn clone(&self) -> GlassesViewport
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for GlassesViewport
Source§impl Debug for GlassesViewport
impl Debug for GlassesViewport
impl Eq for GlassesViewport
Source§impl PartialEq for GlassesViewport
impl PartialEq for GlassesViewport
impl StructuralPartialEq for GlassesViewport
Auto Trait Implementations§
impl Freeze for GlassesViewport
impl RefUnwindSafe for GlassesViewport
impl Send for GlassesViewport
impl Sync for GlassesViewport
impl Unpin for GlassesViewport
impl UnsafeUnpin for GlassesViewport
impl UnwindSafe for GlassesViewport
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.