Rust 的 RESTful 框架 rustful
- 授权协议: MIT
- 开发语言: Rust
- 操作系统: 跨平台
- 软件首页: https://github.com/Ogeon/rustful
- 软件文档: http://ogeon.github.io/rustful/doc/rustful/
软件介绍
rustful 是 Rust 编程语言的一个 RESTful 框架,主要目的是创建一个简单、轻量级的 HTTP 服务应用基础。基于无状态结构,根据路径和 HTTP 方法映射到响应处理器。
示例代码:
//Include rustful_macros during syntax phase to be able to use the macros
#![feature(phase)]
#[phase(plugin)]
extern crate rustful_macros;
extern crate rustful;
extern crate http;
use rustful::{Server, Request, Response};
use http::method::Get;
///Our handler function
fn handler(request: Request, response: &mut Response) {
//Send something nice to the user
try_send!(response, "Hello, user! It looks like this server works fine." while "sending hello");
}
fn main() {
let server = Server::new(8080, router!{"/" => Get: handler});
//Start the server. All code beyond this point is unreachable
server.run();
}
刘大猫的财富之旅
刘欣、刘大猫 / 新华出版社 / 2017-7-21 / 58.00元
作者刘大猫是一名90后的互联网连环创业者,26岁的他通过互联网创业收获到了财富,不仅仅是物质财富,还有认知的财富。 与其他创业类书籍不通的是,这本书非常真实,务实。书中没有任何大道理鸡汤,作者用平实的语言记录了创业以来遇到的种种事情,变化,困境,以及阶段性的成绩,记录了作者务实,鲜活的创业青春。一起来看看 《刘大猫的财富之旅》 这本书的介绍吧!
