// Copyright 2015 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 or the MIT license // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. #![feature(associated_type_defaults)] use std::marker::PhantomData; pub trait Routing { type Output; fn resolve(&self, input: I); } pub trait ToRouting { type Input; type Routing : ?Sized = Routing; fn to_routing(self) -> Self::Routing; } pub struct Mount> { action: R, _marker: PhantomData } impl> Mount { pub fn create>(mount: &str, input: T) { input.to_routing(); } } fn main() { }