pub struct Constant {
pub name: Option<String>,
pub ty: Handle<Type>,
pub init: Handle<Expression>,
}
Available on
wgpu_core
or naga
only.Expand description
Constant value.
Fields§
§name: Option<String>
§ty: Handle<Type>
§init: Handle<Expression>
The value of the constant.
This Handle
refers to Module::global_expressions
, not
any Function::expressions
arena.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Constant
impl<'de> Deserialize<'de> for Constant
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<Constant, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<Constant, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for Constant
impl PartialEq for Constant
source§impl Serialize for Constant
impl Serialize for Constant
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for Constant
Auto Trait Implementations§
impl Freeze for Constant
impl RefUnwindSafe for Constant
impl Send for Constant
impl Sync for Constant
impl Unpin for Constant
impl UnwindSafe for Constant
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