You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Full dump of the various proposals for improving the context api cwfitzgerald@f508bbd
Notable points is that there will be a trait for every type with any inherent methods. It will be stored in a thing like this:
enumInterfaceType<Core,WebGPU>{Core(Core),WebGPU(WebGPU),}impl<Core,WebGPU>InterfaceType{fnas_core(&self) -> &Core{matchself{InterfaceType::Core(value) => value,
_ => panic!("AdapterInterfaceType is not core"),}}fnas_webgpu(&self) -> &WebGPU{matchself{InterfaceType::WebGPU(value) => value,
_ => panic!("AdapterInterfaceType is not webgpu"),}};}// For each type with a trait:implDerefforInterfaceType<crate::wgpu_core::Adapter,crate::webgpu::Adapter>{typeTarget = dynAdapterInterface;fnderef(&self) -> &Self::Target{matchself{InterfaceType::Core(value) => value,InterfaceType::WebGPU(value) => value,}}}
Full dump of the various proposals for improving the context api cwfitzgerald@f508bbd
Notable points is that there will be a trait for every type with any inherent methods. It will be stored in a thing like this:
Then do the same trick for the Context
The context trait will do all the as_core/as_webgpu calls inline right at the beginning.
The text was updated successfully, but these errors were encountered: