Skip to content

Instantly share code, notes, and snippets.

#[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,
#[derive(PartialEq)]
enum Methods {
ALL,
GET,
HEAD,
POST,
PUT,
DELETE,
CONNECT,
OPTIONS,
// ==== 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))
#[derive(Debug)]
struct Entity {
x: u16,
y: u16,
}
impl Entity {
fn update(&mut self) -> Option<Entity> {
if self.x == u16::MAX {
self.x = 0;
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,
#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
struct Point {
x: isize,
y: isize,
}
struct Circle {
center: Point,
radius: f64,
}
struct Point {
x: isize,
y: isize,
}
struct Circle {
center: Point,
radius: f64,
}
// The standard library imports.
use std::sync::mpsc::channel;
use std::thread::spawn;
use std::sync::Mutex;
use rouille;
fn main() {
println!("Hello, world!");
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