pub enum Type {
Pointer(StorageClass, Box<Type>),
Scalar(ScalarType),
Composite(CompositeType),
}Variants§
Implementations§
Source§impl Type
impl Type
pub fn pointer(storage_class: StorageClass, ty: impl Into<Type>) -> Type
pub fn required_capabilities(&self) -> Vec<Capability>
pub fn comptime_byte_size(&self, module: &ModuleBuilder<'_>) -> Option<u32>
pub fn is_scalar(&self) -> bool
pub fn is_composite(&self) -> bool
pub fn get_scalar(&self) -> Option<&ScalarType>
pub fn get_composite(&self) -> Option<&CompositeType>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Type
impl<'de> Deserialize<'de> for Type
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<CompositeType> for Type
impl From<CompositeType> for Type
Source§fn from(value: CompositeType) -> Self
fn from(value: CompositeType) -> Self
Converts to this type from the input type.
Source§impl From<IntegerKind> for Type
impl From<IntegerKind> for Type
Source§fn from(value: IntegerKind) -> Self
fn from(value: IntegerKind) -> Self
Converts to this type from the input type.
Source§impl From<ScalarType> for Type
impl From<ScalarType> for Type
Source§fn from(value: ScalarType) -> Self
fn from(value: ScalarType) -> Self
Converts to this type from the input type.
Source§impl Translation for Type
impl Translation for Type
impl StructuralPartialEq for Type
Auto Trait Implementations§
impl Freeze for Type
impl RefUnwindSafe for Type
impl Send for Type
impl Sync for Type
impl Unpin for Type
impl UnwindSafe for Type
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