pub struct SelectVariant {
pub field: String,
pub value: u32,
}Expand description
select-variant{field=NAME,value=N} (both required: the choice is the caller’s): in every ShaderBinding that
has stages keyed by field (super::VariantKey), the stages of the variant value stay, without their key, and
the stages of the other variants of that field are left out, counted. The binding then holds one stage of each kind
under no key, as a consumer that draws one program of a stage reads it. A stage with no key or a key of another
field is left as it is; a binding with no stage keyed by field, or none of the value value (a source numbers a
binding’s variants from 0, so bindings hold different numbers of them), is left as it is and counted. A value
that no binding of the world carries, or a field none uses, is an error naming the fields and values the world
does carry, and changes nothing. A program only the stages left out drew (its core.shader entity, which nothing
in the world refers to any more) is despawned, counted.
Fields§
§field: String§value: u32Trait Implementations§
Source§impl Clone for SelectVariant
impl Clone for SelectVariant
Source§impl Debug for SelectVariant
impl Debug for SelectVariant
impl Eq for SelectVariant
Source§impl PartialEq for SelectVariant
impl PartialEq for SelectVariant
Source§impl Pass for SelectVariant
impl Pass for SelectVariant
Source§fn modifies(&self) -> &[&'static str]
fn modifies(&self) -> &[&'static str]
The stages of the other variants are taken out of the binding in place, and the chosen ones lose their key.
Source§fn despawns_entities(&self) -> bool
fn despawns_entities(&self) -> bool
The programs only the left-out stages drew.
Source§fn options(&self) -> Options
fn options(&self) -> Options
fn run(&self, w: &mut World, log: &mut PassLog) -> Result<(), String>
Source§fn may_lack_inputs(&self) -> bool
fn may_lack_inputs(&self) -> bool
StepReport::skipped). Required names are prerequisites, so this is false
unless the pass says otherwise: an absent name may be a failed load or a wrong order, and a pass that
summarizes, decides or plans never opts in.Source§fn settings(&self) -> &[Setting]
fn settings(&self) -> &[Setting]
crate::parallel::THREADS, PassManager::with_settings): checked with Pass::requires before it runs and
refused where absent, never counted in whether it is skipped (Pass::may_lack_inputs), and stated in its
step’s report.Source§fn approximates(&self) -> &'static str
fn approximates(&self) -> &'static str
Source§fn removes_by_log(&self) -> bool
fn removes_by_log(&self) -> bool
crate::Component::apply_linear does). If so, a component name that disappears is accepted when the pass
recorded it in PassLog::removed as well as when it is declared in Pass::removes; a name that disappears
unrecorded and undeclared is an error as ever, and a resource it removes must be declared as for any pass.Source§fn settles(&self) -> &[&'static str]
fn settles(&self) -> &[&'static str]
PassManager::run refuses such a pipeline before it runs (Error::SettledThenChanged).
Modifying settled values later is allowed. A modifier must not add
values without declaring them in Pass::provides; the target’s value rules check the result.impl StructuralPartialEq for SelectVariant
Auto Trait Implementations§
impl Forget for SelectVariant
impl Freeze for SelectVariant
impl RefUnwindSafe for SelectVariant
impl Send for SelectVariant
impl Sync for SelectVariant
impl Unpin for SelectVariant
impl UnsafeUnpin for SelectVariant
impl UnwindSafe for SelectVariant
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.