<?xml version="1.0" encoding="utf-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"><channel><title>MagicLen</title><link>https://magiclen.org/tag/rust-learning-path/feed</link><description>多元化原創文章，內容包羅萬象，有程式語言、網站應用、軟體介紹、硬體介紹、作業系統、旅行遊記、專題採訪、益智問題、文學創作，以及作者們的知識分享和作品分享。</description><language>zh-TW</language><lastBuildDate>Thu, 23 Apr 2026 19:19:22 +0000</lastBuildDate><sy:updatePeriod>hourly</sy:updatePeriod><sy:updateFrequency>8</sy:updateFrequency><sy:updateBase>1970-01-01T00:00+00:00</sy:updateBase><item><title>Rust 學習之路─第二十四章：建立多執行緒的Web伺服器</title><link>https://magiclen.org/rust-multi-thread-web-server</link><description><![CDATA[    <img src="https://magiclen.org/wp-content/uploads/2018/04/rust-220x162.png" srcset="https://magiclen.org/wp-content/uploads/2018/04/rust-220x162.png 1x, https://magiclen.org/wp-content/uploads/2018/04/rust-440x324.png 2x, https://magiclen.org/wp-content/uploads/2018/04/rust-660x486.png 3x" alt="">
在這個章節中，我們要用最基礎的方式透過TCP的監聽與連接，解析與傳送符合HTTP格式的訊息，來完成我們的Web伺服器。至於會選擇用這樣的方式來製作Web伺服器的原因是，要練習把我們在先前的章節中學到的東西加以應用。畢竟現在crates.io上已經有很多現成的Web框架(Web Framework)可以使用，正常來講我們是不需要從底層刻出Web伺服器的。]]></description><category>研究分享</category><category>Rust</category><category>Rust</category><category>Rust 學習之路</category><guid>https://magiclen.org/rust-multi-thread-web-server</guid><pubDate>Wed, 4 Jul 2018 09:00:17 +0800</pubDate><dc:creator>Magic Len</dc:creator></item><item><title>Rust 學習之路─第二十三章：進階的型別用法</title><link>https://magiclen.org/rust-advanced-type</link><description><![CDATA[    <img src="https://magiclen.org/wp-content/uploads/2018/04/rust-220x162.png" srcset="https://magiclen.org/wp-content/uploads/2018/04/rust-220x162.png 1x, https://magiclen.org/wp-content/uploads/2018/04/rust-440x324.png 2x, https://magiclen.org/wp-content/uploads/2018/04/rust-660x486.png 3x" alt="">
在上一章節的最後我們介紹到利用元組結構體來建立新的型別的方式，在這個章節我們會繼續介紹更多型別的應用。]]></description><category>研究分享</category><category>Rust</category><category>Rust</category><category>Rust 學習之路</category><guid>https://magiclen.org/rust-advanced-type</guid><pubDate>Tue, 3 Jul 2018 09:00:57 +0800</pubDate><dc:creator>Magic Len</dc:creator></item><item><title>Rust 學習之路─第二十二章：進階的特性用法</title><link>https://magiclen.org/rust-advanced-trait</link><description><![CDATA[    <img src="https://magiclen.org/wp-content/uploads/2018/04/rust-220x162.png" srcset="https://magiclen.org/wp-content/uploads/2018/04/rust-220x162.png 1x, https://magiclen.org/wp-content/uploads/2018/04/rust-440x324.png 2x, https://magiclen.org/wp-content/uploads/2018/04/rust-660x486.png 3x" alt="">
這個章節會詳細介紹特性的關聯型別(Associated Type)、運算子多載(Operator Overloading)的實作方式、呼叫名稱相同但屬於不同特性的方法或關聯函數、替外部的型別實作新的特性。]]></description><category>研究分享</category><category>Rust</category><category>Rust</category><category>Rust 學習之路</category><guid>https://magiclen.org/rust-advanced-trait</guid><pubDate>Mon, 2 Jul 2018 09:00:44 +0800</pubDate><dc:creator>Magic Len</dc:creator></item><item><title>Rust 學習之路─第二十一章：進階的生命周期用法</title><link>https://magiclen.org/rust-advanced-lifetime</link><description><![CDATA[    <img src="https://magiclen.org/wp-content/uploads/2018/04/rust-220x162.png" srcset="https://magiclen.org/wp-content/uploads/2018/04/rust-220x162.png 1x, https://magiclen.org/wp-content/uploads/2018/04/rust-440x324.png 2x, https://magiclen.org/wp-content/uploads/2018/04/rust-660x486.png 3x" alt="">
關於Rust的生命周期，我們在先前的章節中已經先學習了一部份了。在這個章節，我們將會學習如何使用生命周期的子型別，了解如何替泛型型別參數指定生命周期，以及特性物件的生命周期規則。]]></description><category>研究分享</category><category>Rust</category><category>Rust</category><category>Rust 學習之路</category><guid>https://magiclen.org/rust-advanced-lifetime</guid><pubDate>Sun, 1 Jul 2018 09:00:04 +0800</pubDate><dc:creator>Magic Len</dc:creator></item><item><title>Rust 學習之路─第二十章：不安全的Rust</title><link>https://magiclen.org/rust-unsafe</link><description><![CDATA[    <img src="https://magiclen.org/wp-content/uploads/2018/04/rust-220x162.png" srcset="https://magiclen.org/wp-content/uploads/2018/04/rust-220x162.png 1x, https://magiclen.org/wp-content/uploads/2018/04/rust-440x324.png 2x, https://magiclen.org/wp-content/uploads/2018/04/rust-660x486.png 3x" alt="">
在最一開始的幾個章節，我們就已經了解到Rust程式語言在編譯階段時，就會進行許多檢查，使得程式在通過編譯後，進入執行階段時，能以有效又安全的方式運行。然而，在某些情況下，通常是處理跟作業系統和硬體有關的底層行為時，使用正常能夠確保安全性的Rust程式碼並無法實現出我們要的功能，此時就會需要使用到可能會讓程式變得不安全的開發方式。]]></description><category>研究分享</category><category>Rust</category><category>Rust</category><category>Rust 學習之路</category><guid>https://magiclen.org/rust-unsafe</guid><pubDate>Sat, 30 Jun 2018 09:00:50 +0800</pubDate><dc:creator>Magic Len</dc:creator></item><item><title>Rust 學習之路─第十九章：巨集</title><link>https://magiclen.org/rust-macro</link><description><![CDATA[    <img src="https://magiclen.org/wp-content/uploads/2018/04/rust-220x162.png" srcset="https://magiclen.org/wp-content/uploads/2018/04/rust-220x162.png 1x, https://magiclen.org/wp-content/uploads/2018/04/rust-440x324.png 2x, https://magiclen.org/wp-content/uploads/2018/04/rust-660x486.png 3x" alt="">
在上一個章節中，我們學習了許多跟文字格式化有關的巨集。在這個章節，我們將會更深入地了解巨集到底是什麼東西，以及實作巨集的方式。]]></description><category>研究分享</category><category>Rust</category><category>Rust</category><category>Rust 學習之路</category><guid>https://magiclen.org/rust-macro</guid><pubDate>Fri, 29 Jun 2018 09:00:34 +0800</pubDate><dc:creator>Magic Len</dc:creator></item><item><title>Rust 學習之路─第十八章：格式化文字</title><link>https://magiclen.org/rust-formatted-string</link><description><![CDATA[    <img src="https://magiclen.org/wp-content/uploads/2018/04/rust-220x162.png" srcset="https://magiclen.org/wp-content/uploads/2018/04/rust-220x162.png 1x, https://magiclen.org/wp-content/uploads/2018/04/rust-440x324.png 2x, https://magiclen.org/wp-content/uploads/2018/04/rust-660x486.png 3x" alt="">
Rust程式語言的標準函式庫中的「std::fmt」模組提供了多種巨集來格式化或是印出字串。在這個章節中，我們將會學習「format!」、「write!」、「writeln!」、「print!」、「println!」、「eprint!」、「eprintln!」巨集的詳細使用方式。]]></description><category>研究分享</category><category>Rust</category><category>Rust</category><category>Rust 學習之路</category><guid>https://magiclen.org/rust-formatted-string</guid><pubDate>Thu, 28 Jun 2018 09:00:58 +0800</pubDate><dc:creator>Magic Len</dc:creator></item><item><title>Rust 學習之路─第十七章：物件導向程式設計</title><link>https://magiclen.org/rust-object-oriented</link><description><![CDATA[    <img src="https://magiclen.org/wp-content/uploads/2018/04/rust-220x162.png" srcset="https://magiclen.org/wp-content/uploads/2018/04/rust-220x162.png 1x, https://magiclen.org/wp-content/uploads/2018/04/rust-440x324.png 2x, https://magiclen.org/wp-content/uploads/2018/04/rust-660x486.png 3x" alt="">
許多人會想問：Rust是物件導向的程式語言嗎？答案可以為是，也可以為不是，端看問這個問題的人對於「物件導向程式語言」定義的嚴格程度。Rust程式語言有結構體，而且可以使用「impl」關鍵字來替結構體實作特性和方法，甚至可以使用「pub」關鍵字來設定成員的存取權限，這難道不就是物件導向程式語言嗎？也許吧！但別忘了，Rust程式語言本身也提供了基本資料型態，我們先不論程式的難易度，其實可以只使用基本資...]]></description><category>研究分享</category><category>Rust</category><category>Rust</category><category>Rust 學習之路</category><guid>https://magiclen.org/rust-object-oriented</guid><pubDate>Wed, 27 Jun 2018 09:00:02 +0800</pubDate><dc:creator>Magic Len</dc:creator></item><item><title>Rust 學習之路─第十六章：並發與並行</title><link>https://magiclen.org/rust-concurrency</link><description><![CDATA[    <img src="https://magiclen.org/wp-content/uploads/2018/04/rust-220x162.png" srcset="https://magiclen.org/wp-content/uploads/2018/04/rust-220x162.png 1x, https://magiclen.org/wp-content/uploads/2018/04/rust-440x324.png 2x, https://magiclen.org/wp-content/uploads/2018/04/rust-660x486.png 3x" alt="">
有關於並發(concurrency)和並行(parallelism)的定義每個人可能有不一樣的解釋。筆者認為並行算是並發的子集合，所謂的「並發」，是指在某項工作結束之前，另一項工作就開始了，但這些工作可以是同時執行，也可以是交替執行。而所謂的「並行」，是並發的一種設計方式，能將工作交給不同的處理器(邏輯處理器)來執行，而達成同時執行兩項以上工作的目的。程式語言如JavaScript，雖然只支援單執...]]></description><category>研究分享</category><category>Rust</category><category>Rust</category><category>Rust 學習之路</category><guid>https://magiclen.org/rust-concurrency</guid><pubDate>Tue, 26 Jun 2018 09:00:25 +0800</pubDate><dc:creator>Magic Len</dc:creator></item><item><title>Rust 學習之路─第十五章：智慧型指標</title><link>https://magiclen.org/rust-smart-pointer</link><description><![CDATA[    <img src="https://magiclen.org/wp-content/uploads/2018/04/rust-220x162.png" srcset="https://magiclen.org/wp-content/uploads/2018/04/rust-220x162.png 1x, https://magiclen.org/wp-content/uploads/2018/04/rust-440x324.png 2x, https://magiclen.org/wp-content/uploads/2018/04/rust-660x486.png 3x" alt="">
相對於傳統直接使用記憶體位址來對應記憶體資料的指標，智慧型指標為一種資料結構，除了擁有基本的指標能對應記憶體資料的功能外，還可以提供其它不同的資訊以及額外的功能。例如我們先前使用過的Vec結構體和String結構體，就是智慧型指標。]]></description><category>研究分享</category><category>Rust</category><category>Rust</category><category>Rust 學習之路</category><guid>https://magiclen.org/rust-smart-pointer</guid><pubDate>Mon, 25 Jun 2018 09:00:27 +0800</pubDate><dc:creator>Magic Len</dc:creator></item></channel></rss>