【Rust日報】 2020-06-11 進一步理解 Rust 錯誤處理

進一步理解 Rust 錯誤處理

本文 Rust 的初學者和對 Rust 感興趣卻還沒能很好上手的朋友更加友好。閱讀和理解大約須要15分鐘,僅需一些基本的編程知識,你就能很好的理解本文。
在文章中,做者會介紹 Rust 中錯誤的基本知識,並分析爲何會這樣處理,而後解釋一些更高級的錯誤處理概念,同時分享一些實用的技巧。原文地址:https://www.halcyon.hr/posts/error-handling-in-rust/
reddit 上參與討論:https://www.reddit.com/r/rust/comments/h12itt/error_handling_in_rust_a_beginners_guide/

rust-search-extension v0.10 版本更新啦👏

社區大佬出品的超好用插件,趕忙來支持一個 o( ̄︶ ̄)o :https://github.com/huhu/rust-search-extension

TinyDB

TinyDB 是一個佔用空間小,速度超快的數據庫,旨在在內存中使用,並在須要保存時輕鬆地從文件中轉儲/檢索。項目地址:https://github.com/scowez/tinydb

rarebears - pandas 的 Rust 實現

目前該項目已經有一些完整的實現:https://github.com/drew-wallace/rarebears

postgrest-rs

postgrest-rs 庫提供了 PostgREST 的 ORM 接口,項目地址:https://github.com/supabase/postgrest-rs
簡單使用示例:
  
    
  
  
  
   
   
            
   
   

  
    
  
  
  
   
   
            
   
   
use postgrest::Postgrest;
let client = Postgrest::new("https://your.postgrest.endpoint");let resp = client .from("your_table") .select("*") .execute() .await?;let body = resp .text() .await?;

Rust PostgresSQL clients benchmark

diesel,elephantry,postgres,sqlx 這四個常見庫的性能測試:https://github.com/elephantry/benchmark#rust-postgressql-clients-benchmark
最新補充,來自網友 biluohc 的評論回覆,他指出原做者的 postgres benchmark 異步sqlx的結果是錯誤的。做爲對比, biluohc 提供了他實現的示例:https://github.com/biluohc/actixweb-sqlx-jwt。更多內容歡迎你們到評論區查看詳情,深刻交流。

Svelte + TypeScript + Parcel + Rust

做者將一些經常使用的技術棧進行組合,製做了用於 Svelte + Rust + TypeScript 的熱模塊重裝的簡單模板,項目地址:https://github.com/HugoDaniel/svelte-template

詳細一點的原文介紹:https://hugodaniel.pt/posts/browser-tech-stack-2020/nginx


From 日報小組 @Jancd

本文分享自微信公衆號 - Rust語言中文社區(rust-china)。
若有侵權,請聯繫 support@oschina.cn 刪除。
本文參與「OSC源創計劃」,歡迎正在閱讀的你也加入,一塊兒分享。git

相關文章
相關標籤/搜索