From 848e5c4e33d7da3f911db2a9f283d335df09daa6 Mon Sep 17 00:00:00 2001 From: darkicewolf50 Date: Fri, 11 Apr 2025 11:26:46 -0600 Subject: [PATCH] finished ch20 intro --- .obsidian/workspace.json | 22 ++++++++++++++++++---- Advanced Features.md | 15 +++++++++++++++ Unsafe Rust.md | 1 + 3 files changed, 34 insertions(+), 4 deletions(-) create mode 100644 Unsafe Rust.md diff --git a/.obsidian/workspace.json b/.obsidian/workspace.json index e1f8c8c..6d5c1b5 100644 --- a/.obsidian/workspace.json +++ b/.obsidian/workspace.json @@ -63,6 +63,20 @@ "title": "Advanced Features" } }, + { + "id": "8cdde5c4be386d20", + "type": "leaf", + "state": { + "type": "markdown", + "state": { + "file": "Unsafe Rust.md", + "mode": "source", + "source": false + }, + "icon": "lucide-file", + "title": "Unsafe Rust" + } + }, { "id": "78cd7043d5d51ffa", "type": "leaf", @@ -116,7 +130,7 @@ } } ], - "currentTab": 3 + "currentTab": 4 } ], "direction": "vertical" @@ -259,10 +273,11 @@ "command-palette:Open command palette": false } }, - "active": "de2ac5df5b921166", + "active": "8cdde5c4be386d20", "lastOpenFiles": [ - "Pattern Matching.md", "Advanced Features.md", + "Unsafe Rust.md", + "Pattern Matching.md", "Places Patterns Can Be Used.md", "Pattern Syntax.md", "Refutability.md", @@ -286,7 +301,6 @@ "Leaky Reference Cycles.md", "Test Controls.md", "Ref Cell Mutability.md", - "Reference Counter Smart Pointer.md", "minigrep/src/lib.rs", "does_not_compile.svg", "Untitled.canvas", diff --git a/Advanced Features.md b/Advanced Features.md index 4472c74..ad1d426 100644 --- a/Advanced Features.md +++ b/Advanced Features.md @@ -1 +1,16 @@ # Advanced Features +So far we learned about the most commonly used parts of the Rust programming language. + +Here we will look at a few aspects of the language you may run into once in a while but may not use everyday. + +This is intended to be used as a reference for when you encounter any unknowns. + +The features covered here are useful in very specific situations. + +In this chapter we will cover +- [Unsafe Rust](./Unsafe%20Rust.md): How to opt out of some of Rust's guarantees and take responsibility for manually upholding those guarantees +- [Advanced traits](): associated types, default type parameters, fully qualified syntax, supertraits, and the new type pattern in relation to traits +- [Advanced types](): more about the newtype pattern, type aliases, the never type, and dynamically sized types +- [Advanced functions and closures](): function pointers and returning closures +- [Macros](): ways to define code that defines more code at compile time +a \ No newline at end of file diff --git a/Unsafe Rust.md b/Unsafe Rust.md new file mode 100644 index 0000000..b119af3 --- /dev/null +++ b/Unsafe Rust.md @@ -0,0 +1 @@ +# Unsafe Rust