1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#[derive(Clone, Copy, Debug, Default)]
pub struct PrimaryLevel;
#[derive(Clone, Copy, Debug, Default)]
pub struct SecondaryLevel;
pub trait Level: Copy + Default + std::fmt::Debug + 'static {
fn raw_level(&self) -> gfx_hal::command::RawLevel;
}
impl Level for PrimaryLevel {
fn raw_level(&self) -> gfx_hal::command::RawLevel {
gfx_hal::command::RawLevel::Primary
}
}
impl Level for SecondaryLevel {
fn raw_level(&self) -> gfx_hal::command::RawLevel {
gfx_hal::command::RawLevel::Secondary
}
}