struct WriterTypeContext<'m> {
module: &'m Module,
names: &'m FastHashMap<NameKey, String>,
}
Fields§
§module: &'m Module
§names: &'m FastHashMap<NameKey, String>
Trait Implementations§
Source§impl TypeContext for WriterTypeContext<'_>
impl TypeContext for WriterTypeContext<'_>
Source§fn type_name(&self, handle: Handle<Type>) -> &str
fn type_name(&self, handle: Handle<Type>) -> &str
Return the name to be used for the type referred to by
handle
.Source§fn write_unnamed_struct<W: Write>(&self, _: &TypeInner, _: &mut W) -> Result
fn write_unnamed_struct<W: Write>(&self, _: &TypeInner, _: &mut W) -> Result
Write a
TypeInner::Struct
for which we are unable to find a name. Read moreSource§fn write_override<W: Write>(&self, _: Handle<Override>, _: &mut W) -> Result
fn write_override<W: Write>(&self, _: Handle<Override>, _: &mut W) -> Result
Write the WGSL form of
override
to out
.Source§fn write_type<W: Write>(&self, handle: Handle<Type>, out: &mut W) -> Result
fn write_type<W: Write>(&self, handle: Handle<Type>, out: &mut W) -> Result
Write the type
ty
as it would appear in a value’s declaration. Read moreSource§fn write_scalar<W: Write>(&self, scalar: Scalar, out: &mut W) -> Result
fn write_scalar<W: Write>(&self, scalar: Scalar, out: &mut W) -> Result
Write the
Scalar
scalar
as a WGSL type.Source§fn write_type_resolution<W: Write>(
&self,
resolution: &TypeResolution,
out: &mut W,
) -> Result
fn write_type_resolution<W: Write>( &self, resolution: &TypeResolution, out: &mut W, ) -> Result
Write the
TypeResolution
resolution
as a WGSL type.fn write_type_conclusion<W: Write>( &self, conclusion: &Conclusion, out: &mut W, ) -> Result
fn write_type_rule<W: Write>( &self, name: &str, rule: &Rule, out: &mut W, ) -> Result
fn type_to_string(&self, handle: Handle<Type>) -> String
fn type_resolution_to_string(&self, resolution: &TypeResolution) -> String
fn type_rule_to_string(&self, name: &str, rule: &Rule) -> String
Auto Trait Implementations§
impl<'m> Freeze for WriterTypeContext<'m>
impl<'m> RefUnwindSafe for WriterTypeContext<'m>
impl<'m> Send for WriterTypeContext<'m>
impl<'m> Sync for WriterTypeContext<'m>
impl<'m> Unpin for WriterTypeContext<'m>
impl<'m> UnwindSafe for WriterTypeContext<'m>
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