mime:Rust中的MIME

时间:2021-05-14 21:55:28
【文件属性】:
文件名称:mime:Rust中的MIME
文件大小:30KB
文件格式:ZIP
更新时间:2021-05-14 21:55:28
Rust 哑剧 支持MIME(HTTP媒体类型)作为Rust中的强类型。 用法 extern crate mime; fn main () { // common types are constants let text = mime :: TEXT_PLAIN; // deconstruct Mimes to match on them match (text. type_ (), text. subtype ()) { (mime :: TEXT, mime :: PLAIN) => { // plain text! }, (mime :: TEXT, _) => { // structured text! }, _ => {
【文件预览】:
mime-master
----.gitignore(20B)
----benches()
--------fmt.rs(425B)
--------cmp.rs(2KB)
--------parse.rs(955B)
----mime-parse()
--------src()
--------Cargo.toml(220B)
----mime-macro()
--------src()
--------Cargo.toml(392B)
----src()
--------constants.rs(3KB)
--------range.rs(9KB)
--------error.rs(402B)
--------serde.rs(1KB)
--------type_.rs(16KB)
--------cmp.rs(1KB)
--------value.rs(11KB)
--------macros.rs(3KB)
--------lib.rs(4KB)
----.travis.yml(284B)
----CONTRIBUTING.md(131B)
----LICENSE(1KB)
----Cargo.toml(800B)
----README.md(785B)

网友评论