osom_asm_x86_64/models/
scale.rs1#![allow(non_upper_case_globals)]
2
3use osom_encoders_x86_64::models as enc_models;
4
5#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
6#[must_use]
7#[repr(transparent)]
8pub struct Scale {
9 value: enc_models::Scale,
10}
11
12impl Scale {
13 pub const Scale1: Self = Self::new(enc_models::Scale::Scale1);
14 pub const Scale2: Self = Self::new(enc_models::Scale::Scale2);
15 pub const Scale4: Self = Self::new(enc_models::Scale::Scale4);
16 pub const Scale8: Self = Self::new(enc_models::Scale::Scale8);
17
18 #[inline(always)]
19 pub(crate) const fn new(value: enc_models::Scale) -> Self {
20 Self { value }
21 }
22
23 #[inline(always)]
24 pub(crate) fn as_enc_scale(self) -> enc_models::Scale {
25 self.value
26 }
27}