I hereby claim:
- I am jkelleyrtp on github.
- I am jkelleyrtp (https://keybase.io/jkelleyrtp) on keybase.
- I have a public key ASC9lYFL_BAdEDf5sFtO1K9nRBh1ZVixwypItG7p7f8oIgo
To claim this, I am signing this object:
struct GlobalState { | |
name: String, | |
age: i32, | |
user: User, | |
} | |
struct User { | |
name: String, | |
age: i32, | |
config: Config, |
/* | |
This code shows how you would make a Rust API polymorphic over various functions. | |
It uses a technique to differentiate impls of a trait using a ZST marker. | |
This particular example might be too complex for the intended crate, hence its extraction into a gist. | |
*/ | |
use std::marker::PhantomData; | |
use tokamak::{Request, Response}; | |
fn main() { |
use tokio::{runtime::Builder, sync::{mpsc}}; | |
use winit::{event::{Event, WindowEvent}, event_loop::{ControlFlow, EventLoop}, window::{Window, WindowBuilder}}; | |
pub struct Gpu { | |
pub surface: wgpu::Surface, | |
pub device: wgpu::Device, | |
pub queue: wgpu::Queue, | |
pub sc_desc: wgpu::SwapChainDescriptor, | |
pub swap_chain: wgpu::SwapChain, |
I hereby claim:
To claim this, I am signing this object: