Skip to content

Instantly share code, notes, and snippets.

@wunki wunki/
Created Sep 15, 2015

What would you like to do?
Minimal closure in struct
extern crate iron;
use iron::prelude::{Request};
struct Resource {
is_available: Box<Fn(Request) -> bool>,
fn defaultResource() -> Resource{
Resource{is_available: Box::new(|_| true )}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.