pub struct SpecConstSet {
pub constants: HashMap<String, SpecializationConstant>,
}Expand description
A set of specialization constants for a shader.
Fields§
§constants: HashMap<String, SpecializationConstant>The constants in this set, keyed by name.
Implementations§
Source§impl SpecConstSet
impl SpecConstSet
Sourcepub fn add(&mut self, constant: SpecializationConstant)
pub fn add(&mut self, constant: SpecializationConstant)
Add a constant.
Sourcepub fn to_defines(&self) -> HashMap<String, String>
pub fn to_defines(&self) -> HashMap<String, String>
Build a HashMap<String, String> suitable for passing to
ShaderSource::instantiate.
Trait Implementations§
Source§impl Clone for SpecConstSet
impl Clone for SpecConstSet
Source§fn clone(&self) -> SpecConstSet
fn clone(&self) -> SpecConstSet
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SpecConstSet
impl Debug for SpecConstSet
Source§impl Default for SpecConstSet
impl Default for SpecConstSet
Source§fn default() -> SpecConstSet
fn default() -> SpecConstSet
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SpecConstSet
impl RefUnwindSafe for SpecConstSet
impl Send for SpecConstSet
impl Sync for SpecConstSet
impl Unpin for SpecConstSet
impl UnsafeUnpin for SpecConstSet
impl UnwindSafe for SpecConstSet
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more