{"version":"https://jsonfeed.org/version/1.1","title":"Rust on 超光速","home_page_url":"https://www.ftls.xyz/categories/rust/","feed_url":"https://www.ftls.xyz/categories/rust/feed.json","authors":[{"name":{"about":"","avatar":"/avatar-128x128.webp","bio":"浮生若梦 为欢几何","email":"0@ftls.xyz","github":"https://github.com/kkbt0","gravataremail":"","link":"https://www.ftls.xyz/","location":"Earth","name":"恐咖兵糖"}}],"items":[{"title":"mlua 链接库函数错误处理","id":"https://www.ftls.xyz/posts/2024-07-10-mlua-err/","url":"https://www.ftls.xyz/posts/2024-07-10-mlua-err/","content_text":"\u003cp\u003emlua 链接库函数错误处理两种方法。\u003c/p\u003e","date_published":"2024-07-10T12:29:41+08:00","tags":["Rust"]},{"title":"Rust 函数式","id":"https://www.ftls.xyz/posts/20220424/","url":"https://www.ftls.xyz/posts/20220424/","content_text":"\u003cp\u003eRust 函数结果作为下一个函数的输入,类似 \u003ccode\u003elet vec = \u0026quot;ada\u0026quot;.chars().collect::\u0026lt;Vec\u0026lt;char\u0026gt;\u0026gt;();\u003c/code\u003e\u003c/p\u003e","date_published":"2022-04-24T09:56:26+08:00","tags":["Rust"]},{"title":"Simple Web Server 修改版","id":"https://www.ftls.xyz/posts/simple-web-server/","url":"https://www.ftls.xyz/posts/simple-web-server/","content_text":"\u003cp\u003eRust 权威指南中最后实现了一个简单的 Http-Server ，我尝试修改了下。使其能够简单可用，能解析路径和图片。也就是说，在一个 Hugo 生成的 public 下运行能够正常访问网站。\u003c/p\u003e","date_published":"2022-04-18T16:07:29+08:00","tags":["Rust"]},{"title":"Rust Simple Grep","id":"https://www.ftls.xyz/posts/simple-grep/","url":"https://www.ftls.xyz/posts/simple-grep/","content_text":"一个用 Rust 实现的简单的 grep，可以读取文件，匹配正则表达式。","date_published":"2022-04-11T09:13:17+08:00","tags":["Rust"]},{"title":"Rust 读写文件","id":"https://www.ftls.xyz/posts/rustio/","url":"https://www.ftls.xyz/posts/rustio/","content_text":"\u003cp\u003e最近因为在研究数据持久化，因此整理了下 Rust 的常见的几种io操作。\u003c/p\u003e","date_published":"2022-03-23T20:09:34+08:00","tags":["Rust"]},{"title":"Rust Polymorphism Simple Example","id":"https://www.ftls.xyz/posts/rust-polymorphism-simple-example/","url":"https://www.ftls.xyz/posts/rust-polymorphism-simple-example/","content_text":"\u003cp\u003e使用 Enum 和 Trait 解决经典多态问题\u003c/p\u003e","date_published":"2022-03-13T10:22:07+08:00","tags":["Rust"]},{"title":"Rust Web Rokcet 系列 3 使用 JWT ","id":"https://www.ftls.xyz/posts/rust-rocket3/","url":"https://www.ftls.xyz/posts/rust-rocket3/","content_text":"\u003cp\u003eJWT即使用的包是jsonwebtoken。是使用token进行验证的一种方式。基于\u003ccode\u003etoken\u003c/code\u003e的认证方式相比传统的\u003ccode\u003esession\u003c/code\u003e认证方式相比节约服务器资源。 JWT 官网 \u003ca href=\"https://jwt.io/\"\r\n  rel=\"external nofollow noopener noreferrer\" target=\"_blank\"\u003ehttps://jwt.io/\u003cspan style=\"user-select:none\"\u003e ↗\u003c/span\u003e\u003c/a\u003e 。\u003c/p\u003e","date_published":"2022-02-16T13:32:05+08:00","tags":["Rust","Web","Rocket"]},{"title":"Rust Web Rokcet 系列 2 连接数据库 和 CURD 增删改查","id":"https://www.ftls.xyz/posts/rust-rocket2/","url":"https://www.ftls.xyz/posts/rust-rocket2/","content_text":"\u003cp\u003e使用的是 SQLite 数据库，实际上各种数据库都大同小异。已经有很多包帮助我们处理各种细节。目前 diesel 支持mysql，postgres和sqlite。\u003cem\u003e函数使用方法一般都在鼠标移动到函数上，显示出的文档中。换句话说，在 Ctrl+左键 点击进去显示的源文件的字里行间之中。\u003c/em\u003e\u003c/p\u003e","date_published":"2022-02-15T09:08:37+08:00","tags":["Rust","Web","Rocket"]},{"title":"Rust Web Rokcet 系列 1 Hello，World！与 GET，POST，PUT，DELETE","id":"https://www.ftls.xyz/posts/rust-rocket1/","url":"https://www.ftls.xyz/posts/rust-rocket1/","content_text":"\u003cp\u003eRust web 领域目前有几个使用较多的框架，如 actix-web， Rocket 等等。我在使用 jwt 时使用过 Rocket ，由于最初使用的是  0.5.0-rc.1 版本，连接数据库的时候走了一些弯路。因此记录这篇文章给后来的人一点借鉴。\u003c/p\u003e","date_published":"2022-02-14T13:17:43+08:00","tags":["Rust","Web","Rocket"]},{"title":"Rust目录结构 简单使用","id":"https://www.ftls.xyz/posts/rustmod/","url":"https://www.ftls.xyz/posts/rustmod/","content_text":"\u003cp\u003eRust mod 的引用\u003c/p\u003e","date_published":"2022-02-10T12:38:14+08:00","tags":["Rust"]}]}