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
28
29
30
31
32
33
34
use super::state::*;
#[derive(Clone, Copy, Debug, Default)]
pub struct IndividualReset;
#[derive(Clone, Copy, Debug, Default)]
pub struct NoIndividualReset;
pub trait Reset: Copy + Default + std::fmt::Debug + 'static {
fn flags(&self) -> gfx_hal::pool::CommandPoolCreateFlags;
}
impl Reset for IndividualReset {
fn flags(&self) -> gfx_hal::pool::CommandPoolCreateFlags {
gfx_hal::pool::CommandPoolCreateFlags::RESET_INDIVIDUAL
}
}
impl Reset for NoIndividualReset {
fn flags(&self) -> gfx_hal::pool::CommandPoolCreateFlags {
gfx_hal::pool::CommandPoolCreateFlags::empty()
}
}
pub trait Resettable {}
impl Resettable for InitialState {}
impl<U, P> Resettable for RecordingState<U, P> {}
impl<U, P> Resettable for ExecutableState<U, P> {}
impl Resettable for InvalidState {}