rendy_command/buffer/
reset.rs1use super::state::*;
2
3#[derive(Clone, Copy, Debug, Default)]
5pub struct IndividualReset;
6
7#[derive(Clone, Copy, Debug, Default)]
9pub struct NoIndividualReset;
10
11pub trait Reset: Copy + Default + std::fmt::Debug + 'static {
13 fn flags(&self) -> rendy_core::hal::pool::CommandPoolCreateFlags;
15}
16
17impl Reset for IndividualReset {
18 fn flags(&self) -> rendy_core::hal::pool::CommandPoolCreateFlags {
19 rendy_core::hal::pool::CommandPoolCreateFlags::RESET_INDIVIDUAL
20 }
21}
22
23impl Reset for NoIndividualReset {
24 fn flags(&self) -> rendy_core::hal::pool::CommandPoolCreateFlags {
25 rendy_core::hal::pool::CommandPoolCreateFlags::empty()
26 }
27}
28
29pub trait Resettable {}
31impl Resettable for InitialState {}
32impl<U, P> Resettable for RecordingState<U, P> {}
33impl<U, P> Resettable for ExecutableState<U, P> {}
34impl Resettable for InvalidState {}