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();
}
学习JavaScript数据结构与算法(第2版)
[巴西] Loiane Groner / 邓 钢、孙晓博、吴 双、陈 迪、袁 源 / 人民邮电出版社 / 2017-9 / 49.00元
本书首先介绍了JavaScript 语言的基础知识以及ES6 和ES7 中引入的新功能,接下来讨论了数组、栈、队列、链表、集合、字典、散列表、树、图等数据结构,之后探讨了各种排序和搜索算法,包括冒泡排序、选择排序、插入排序、归并排序、快速排序、堆排序、计数排序、桶排序、基数排序、顺序搜索、二分搜索,然后介绍了动态规划和贪心算法等常用的高级算法以及函数式编程,最后还介绍了如何计算算法的复杂度。一起来看看 《学习JavaScript数据结构与算法(第2版)》 这本书的介绍吧!
JS 压缩/解压工具
在线压缩/解压 JS 代码
HEX HSV 转换工具
HEX HSV 互换工具
