#[non_exhaustive]#[repr(u8)]pub enum Resolution {
R1 = 0,
R2 = 1,
R4 = 2,
R8 = 3,
R16 = 4,
R32 = 5,
R64 = 6,
R128 = 7,
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Implementations§
Source§impl Resolution
impl Resolution
Sourcepub const MAX: Resolution = Resolution::R128
pub const MAX: Resolution = Resolution::R128
The maximum available resolution.
Sourcepub const fn double(self) -> Option<Self>
pub const fn double(self) -> Option<Self>
Returns the Resolution that’s twice this one, or None at the limit.
Trait Implementations§
Source§impl Clone for Resolution
impl Clone for Resolution
Source§fn clone(&self) -> Resolution
fn clone(&self) -> Resolution
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Resolution
impl Debug for Resolution
Source§impl Display for Resolution
impl Display for Resolution
Source§impl Div for Resolution
impl Div for Resolution
Source§impl Exhaust for Resolution
impl Exhaust for Resolution
Source§type Iter = ExhaustResolutionIter
type Iter = ExhaustResolutionIter
Iterator type returned by
Self::exhaust_factories().
See the trait documentation for what properties this iterator should have. Read moreSource§fn exhaust_factories() -> Self::Iter
fn exhaust_factories() -> Self::Iter
Source§fn from_factory(factory: Self::Factory) -> Self
fn from_factory(factory: Self::Factory) -> Self
Construct a concrete value of this type from a
Self::Factory value produced by
its Self::Iter. Read moreSource§impl From<Resolution> for f32
impl From<Resolution> for f32
Source§fn from(r: Resolution) -> f32
fn from(r: Resolution) -> f32
Converts to this type from the input type.
Source§impl From<Resolution> for f64
impl From<Resolution> for f64
Source§fn from(r: Resolution) -> f64
fn from(r: Resolution) -> f64
Converts to this type from the input type.
Source§impl From<Resolution> for i32
impl From<Resolution> for i32
Source§fn from(r: Resolution) -> i32
fn from(r: Resolution) -> i32
use all_is_cubes::block::Resolution;
assert_eq!(64, i32::from(Resolution::R64));Source§impl From<Resolution> for u16
impl From<Resolution> for u16
Source§fn from(r: Resolution) -> u16
fn from(r: Resolution) -> u16
Converts to this type from the input type.
Source§impl From<Resolution> for u32
impl From<Resolution> for u32
Source§fn from(r: Resolution) -> u32
fn from(r: Resolution) -> u32
Converts to this type from the input type.
Source§impl From<Resolution> for usize
impl From<Resolution> for usize
Source§fn from(r: Resolution) -> usize
fn from(r: Resolution) -> usize
Converts to this type from the input type.
Source§impl Hash for Resolution
impl Hash for Resolution
Source§impl Mul for Resolution
impl Mul for Resolution
Source§impl Ord for Resolution
impl Ord for Resolution
Source§fn cmp(&self, other: &Resolution) -> Ordering
fn cmp(&self, other: &Resolution) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for Resolution
impl PartialEq for Resolution
Source§impl PartialOrd for Resolution
impl PartialOrd for Resolution
Source§impl TryFrom<i128> for Resolution
impl TryFrom<i128> for Resolution
Source§impl TryFrom<i16> for Resolution
impl TryFrom<i16> for Resolution
Source§impl TryFrom<i32> for Resolution
impl TryFrom<i32> for Resolution
Source§impl TryFrom<i64> for Resolution
impl TryFrom<i64> for Resolution
Source§impl TryFrom<isize> for Resolution
impl TryFrom<isize> for Resolution
Source§impl TryFrom<u128> for Resolution
impl TryFrom<u128> for Resolution
Source§impl TryFrom<u16> for Resolution
impl TryFrom<u16> for Resolution
Source§impl TryFrom<u32> for Resolution
impl TryFrom<u32> for Resolution
Source§impl TryFrom<u64> for Resolution
impl TryFrom<u64> for Resolution
Source§impl TryFrom<usize> for Resolution
impl TryFrom<usize> for Resolution
impl Copy for Resolution
impl Eq for Resolution
impl StructuralPartialEq for Resolution
Auto Trait Implementations§
impl Freeze for Resolution
impl RefUnwindSafe for Resolution
impl Send for Resolution
impl Sync for Resolution
impl Unpin for Resolution
impl UnwindSafe for Resolution
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> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
Source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
Source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
Source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
Source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.