Skip to content

Instantly share code, notes, and snippets.

Hi, it's /u/ZRM2 from reddit.
#![feature(os, collections, core)]
extern crate cef;
extern crate glium;
extern crate glutin;
extern crate image;
use std::cell::RefCell;
use std::default::Default;
#![feature(os, core)]
extern crate cef;
extern crate glium;
extern crate glutin;
extern crate image;
use std::cell::RefCell;
use std::default::Default;
#![feature(os, core)]
extern crate cef;
extern crate glium;
extern crate glutin;
extern crate image;
use std::cell::RefCell;
use std::default::Default;
@dylanede
dylanede / ffi.h
Created February 5, 2015 20:50
CEF C API combined header
#include "cef_app_capi.h"
#include "cef_auth_callback_capi.h"
#include "cef_base_capi.h"
#include "cef_browser_capi.h"
#include "cef_browser_process_handler_capi.h"
#include "cef_callback_capi.h"
#include "cef_client_capi.h"
#include "cef_command_line_capi.h"
#include "cef_context_menu_handler_capi.h"
#include "cef_cookie_capi.h"
@dylanede
dylanede / hkt.rs
Last active August 29, 2015 14:24 — forked from anonymous/playground.rs
trait Apply {
type Out;
}
trait Unapply {
type Out;
}
type Applied<F, T> = <(F, T) as Apply>::Out;
type Unapplied<T> = <T as Unapply>::Out;
//This trait is not used, but is useful for type equality constraints
trait ID {
type Out;
}
impl<T> ID for T {
type Out = T;
}
trait CanApply {
type Out: CanUnapply;
//This trait is not used, but is useful for type equality constraints
trait ID {
type Out;
}
impl<T> ID for T {
type Out = T;
}
trait CanApply {
type Out: CanUnapply;
#![feature(optin_builtin_traits)]
use std::marker::PhantomData;
// Type functions in modern Rust:
// The signature of a type function is a trait.
// The trait's associated types correspond to the function's range.
// Its type parameters excluding the last parameter correspond to the function's
// domain.
@dylanede
dylanede / playground.rs
Created October 16, 2015 13:00 — forked from anonymous/playground.rs
Shared via Rust Playground
#![feature(optin_builtin_traits)]
use std::marker::PhantomData;
struct Nil;
struct Cons<H, T>(H, T);
struct Zero;
struct One;
trait UInt {