mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-22 23:05:43 +00:00
added future extensibility for extensions
This commit is contained in:
parent
667dd6d0df
commit
c2a8492313
@ -28,6 +28,9 @@ macro_rules! extensions {
|
||||
$(
|
||||
pub $ext: bool,
|
||||
)*
|
||||
|
||||
/// Helper for future extensibility.
|
||||
pub _hidden: Hidden,
|
||||
}
|
||||
|
||||
impl $sname {
|
||||
@ -36,6 +39,7 @@ macro_rules! extensions {
|
||||
pub fn none() -> $sname {
|
||||
$sname {
|
||||
$($ext: false,)*
|
||||
_hidden: Hidden(())
|
||||
}
|
||||
}
|
||||
|
||||
@ -53,6 +57,7 @@ macro_rules! extensions {
|
||||
$(
|
||||
$ext: self.$ext && other.$ext,
|
||||
)*
|
||||
_hidden: Hidden(())
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -197,6 +202,10 @@ impl From<Error> for SupportedExtensionsError {
|
||||
}
|
||||
}
|
||||
|
||||
/// Non-constructible helper for future extensibility of extension structs.
|
||||
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
|
||||
pub struct Hidden(());
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use instance::InstanceExtensions;
|
||||
|
Loading…
Reference in New Issue
Block a user