This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[derive(PartialEq)] | |
#[repr(u16)] | |
enum Methods { | |
ALL = 0, | |
GET = 1 << 0, | |
HEAD = 1 << 1, | |
POST = 1 << 2, | |
PUT = 1 << 3, | |
DELETE = 1 << 4, | |
CONNECT = 1 << 5, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[derive(PartialEq)] | |
enum Methods { | |
ALL, | |
GET, | |
HEAD, | |
POST, | |
PUT, | |
DELETE, | |
CONNECT, | |
OPTIONS, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==== CURRENT ==== | |
// insert | |
mystore.insert(&key1, MSG2); | |
// insert async | |
let in_handle = mystore.insert_async(&key1, MSG2)?; | |
store.pending_insert_wait(in_handle); | |
// (in-review) buildable insert | |
store.build_insert(&key1, MSG1) | |
.mode(InsertMode::Add) | |
.time_to_live(std::time::Duration::from_secs(5)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[derive(Debug)] | |
struct Entity { | |
x: u16, | |
y: u16, | |
} | |
impl Entity { | |
fn update(&mut self) -> Option<Entity> { | |
if self.x == u16::MAX { | |
self.x = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use serde::{Serialize, Deserialize}; | |
use serde::de::{Deserializer, SeqAccess, Visitor}; | |
use std::fmt; | |
#[derive(Debug)] | |
struct BatchAction {} | |
#[derive(Serialize, Deserialize, Debug)] | |
struct KVItem<'a> { | |
key: &'a str, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <GLES2/gl2.h> | |
#include <SDL2/SDL.h> | |
#include <SDL2/SDL_error.h> | |
#include <SDL2/SDL_events.h> | |
#include <SDL2/SDL_opengles2.h> | |
#include <SDL2/SDL_render.h> | |
#define WINDOW_W 320 | |
#define WINDOW_H 180 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Point { | |
x: isize, | |
y: isize, | |
} | |
struct Circle { | |
center: Point, | |
radius: f64, | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Point { | |
x: isize, | |
y: isize, | |
} | |
struct Circle { | |
center: Point, | |
radius: f64, | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The standard library imports. | |
use std::sync::mpsc::channel; | |
use std::thread::spawn; | |
use std::sync::Mutex; | |
use rouille; | |
fn main() { | |
println!("Hello, world!"); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
puterr: '\0' 0 | |
puterr: '\u{1}' 1 | |
puterr: '\u{2}' 2 | |
puterr: '\u{3}' 3 | |
puterr: '\u{4}' 4 | |
puterr: '\u{5}' 5 | |
puterr: '\u{6}' 6 | |
puterr: '\u{7}' 7 | |
puterr: '\u{8}' 8 | |
puterr: '\t' 9 |
NewerOlder