Enum shades::scope::ScopedHandle
source · [−]pub enum ScopedHandle {
BuiltIn(BuiltIn),
Global(u16),
FunArg(u16),
FunVar {
subscope: u16,
handle: u16,
},
Input(u16),
Output(u16),
Env(String),
}
Expand description
Hierarchical and namespaced handle.
Handles live in different namespaces:
- The built-in namespace gathers all built-ins.
- The global namespace gathers everything that can be declared at top-level of a shader stage — i.e. mainly constants for this namespace.
- The input namespace gathers inputs.
- The output namespace gathers outputs.
- The function argument namespace gives handles to function arguments, which exist only in a function body.
- The function variable namespace gives handles to variables defined in function bodies. This namespace is hierarchical: for each scope, a new namespace is created. The depth at which a namespace is located is referred to as its subscope.
Variants
BuiltIn(BuiltIn)
Global(u16)
FunArg(u16)
FunVar
Input(u16)
Output(u16)
Env(String)
Trait Implementations
sourceimpl Clone for ScopedHandle
impl Clone for ScopedHandle
sourcefn clone(&self) -> ScopedHandle
fn clone(&self) -> ScopedHandle
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ScopedHandle
impl Debug for ScopedHandle
sourceimpl Hash for ScopedHandle
impl Hash for ScopedHandle
sourceimpl Ord for ScopedHandle
impl Ord for ScopedHandle
sourceimpl PartialEq<ScopedHandle> for ScopedHandle
impl PartialEq<ScopedHandle> for ScopedHandle
sourcefn eq(&self, other: &ScopedHandle) -> bool
fn eq(&self, other: &ScopedHandle) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ScopedHandle) -> bool
fn ne(&self, other: &ScopedHandle) -> bool
This method tests for !=
.
sourceimpl PartialOrd<ScopedHandle> for ScopedHandle
impl PartialOrd<ScopedHandle> for ScopedHandle
sourcefn partial_cmp(&self, other: &ScopedHandle) -> Option<Ordering>
fn partial_cmp(&self, other: &ScopedHandle) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Eq for ScopedHandle
impl StructuralEq for ScopedHandle
impl StructuralPartialEq for ScopedHandle
Auto Trait Implementations
impl RefUnwindSafe for ScopedHandle
impl Send for ScopedHandle
impl Sync for ScopedHandle
impl Unpin for ScopedHandle
impl UnwindSafe for ScopedHandle
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more