pub struct TypeMapper { /* private fields */ }Expand description
Type mapper for converting Rust types to WGSL types.
Implementations§
Source§impl TypeMapper
impl TypeMapper
Sourcepub fn register_type(&mut self, rust_name: &str, wgsl_type: WgslType)
pub fn register_type(&mut self, rust_name: &str, wgsl_type: WgslType)
Register a custom type mapping.
Sourcepub fn disable_lossy_warnings(&mut self)
pub fn disable_lossy_warnings(&mut self)
Disable warnings for lossy conversions (e.g., f64 -> f32).
Trait Implementations§
Source§impl Clone for TypeMapper
impl Clone for TypeMapper
Source§fn clone(&self) -> TypeMapper
fn clone(&self) -> TypeMapper
Returns a duplicate of the value. Read more
1.0.0 · 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 TypeMapper
impl Debug for TypeMapper
Auto Trait Implementations§
impl Freeze for TypeMapper
impl RefUnwindSafe for TypeMapper
impl Send for TypeMapper
impl Sync for TypeMapper
impl Unpin for TypeMapper
impl UnwindSafe for TypeMapper
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