<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>References on New Schematic</title><link>https://newschematic.org/reference/</link><description>Recent content in References on New Schematic</description><generator>Hugo</generator><language>en-us</language><copyright>Christopher Boette, CC by-sa-nc</copyright><lastBuildDate>Mon, 12 May 2025 11:18:34 -0500</lastBuildDate><atom:link href="https://newschematic.org/reference/index.xml" rel="self" type="application/rss+xml"/><item><title>Rust: personal reference</title><link>https://newschematic.org/reference/rust/</link><pubDate>Mon, 12 May 2025 11:18:34 -0500</pubDate><guid>https://newschematic.org/reference/rust/</guid><description>&lt;h2 id="methods-on-built-ins"&gt;Methods on built-ins&lt;/h2&gt;
&lt;h3 id="hashmap"&gt;Hashmap&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;.entry&lt;/code&gt; — Used for in-place manipulation of the value for a corresponding key, &lt;code&gt;scores.entry(team_id)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;.or_default&lt;/code&gt; — Insert an empty default value if the key is not present, returning a mutable reference, &lt;code&gt;scores.entry(team_id).or_default()&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;.or_insert&lt;/code&gt; — Insert a populated default value if the key is not present, also returning a mutable reference, &lt;code&gt;sat_scores.entry(student_id).or_insert(400)&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="string-slice"&gt;String slice&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;.len&lt;/code&gt; — Get the length of the string slice, &lt;code&gt;name.len()&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;.is_empty&lt;/code&gt; — Check if the string slice is empty, &lt;code&gt;name.is_empty()&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;.to_string&lt;/code&gt; — Convert a string slice to a &lt;code&gt;String&lt;/code&gt;, &lt;code&gt;name.to_string()&lt;/code&gt;; compare, contrast with &lt;code&gt;String::from&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="keywords"&gt;Keywords&lt;/h2&gt;
&lt;h3 id="variable-bindings-and-data-declaration"&gt;Variable Bindings and Data Declaration&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;let&lt;/code&gt; — Declare a variable&lt;/li&gt;
&lt;li&gt;&lt;code&gt;const&lt;/code&gt; — Declare a compile-time constant&lt;/li&gt;
&lt;li&gt;&lt;code&gt;static&lt;/code&gt; — Declare a static variable (global variable with a fixed memory location)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;mut&lt;/code&gt; — Mark a binding as mutable&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ref&lt;/code&gt; — Bind by reference&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="type-system"&gt;Type System&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;type&lt;/code&gt; — Create a type alias&lt;/li&gt;
&lt;li&gt;&lt;code&gt;struct&lt;/code&gt; — Define a structure/record type&lt;/li&gt;
&lt;li&gt;&lt;code&gt;enum&lt;/code&gt; — Define an enumeration type&lt;/li&gt;
&lt;li&gt;&lt;code&gt;trait&lt;/code&gt; — Define an interface type&lt;/li&gt;
&lt;li&gt;&lt;code&gt;impl&lt;/code&gt; — Implement methods or traits&lt;/li&gt;
&lt;li&gt;&lt;code&gt;dyn&lt;/code&gt; — Dynamic dispatch to a trait object&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Self&lt;/code&gt; — Type alias for the implementing type within a trait or &lt;code&gt;impl&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;self&lt;/code&gt; — Method receiver or current module&lt;/li&gt;
&lt;li&gt;&lt;code&gt;super&lt;/code&gt; — Parent module&lt;/li&gt;
&lt;li&gt;&lt;code&gt;where&lt;/code&gt; — Add constraints to generic types&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="control-flow"&gt;Control Flow&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;if&lt;/code&gt; — Conditional branching&lt;/li&gt;
&lt;li&gt;&lt;code&gt;else&lt;/code&gt; — Alternative branch in conditional&lt;/li&gt;
&lt;li&gt;&lt;code&gt;match&lt;/code&gt; — Pattern matching&lt;/li&gt;
&lt;li&gt;&lt;code&gt;loop&lt;/code&gt; — Infinite loop&lt;/li&gt;
&lt;li&gt;&lt;code&gt;while&lt;/code&gt; — Conditional loop&lt;/li&gt;
&lt;li&gt;&lt;code&gt;for&lt;/code&gt; — Iterator-based loop&lt;/li&gt;
&lt;li&gt;&lt;code&gt;in&lt;/code&gt; — Part of for loop syntax and pattern matching&lt;/li&gt;
&lt;li&gt;&lt;code&gt;break&lt;/code&gt; — Exit a loop early&lt;/li&gt;
&lt;li&gt;&lt;code&gt;continue&lt;/code&gt; — Skip to the next loop iteration&lt;/li&gt;
&lt;li&gt;&lt;code&gt;return&lt;/code&gt; — Return from a function&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="functions-and-closures"&gt;Functions and Closures&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;fn&lt;/code&gt; — Define a function&lt;/li&gt;
&lt;li&gt;&lt;code&gt;move&lt;/code&gt; — Force closure to take ownership of captured variables&lt;/li&gt;
&lt;li&gt;&lt;code&gt;async&lt;/code&gt; — Define an asynchronous function or block&lt;/li&gt;
&lt;li&gt;&lt;code&gt;await&lt;/code&gt; — Suspend execution until an async result is ready&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="memory-management"&gt;Memory Management&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;unsafe&lt;/code&gt; — Denote unsafe code block&lt;/li&gt;
&lt;li&gt;&lt;code&gt;extern&lt;/code&gt; — Link to external functions or crates&lt;/li&gt;
&lt;li&gt;&lt;code&gt;raw&lt;/code&gt; — Raw pointer operations (used with references)&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="modules-and-visibility"&gt;Modules and Visibility&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;mod&lt;/code&gt; — Define a module&lt;/li&gt;
&lt;li&gt;&lt;code&gt;pub&lt;/code&gt; — Make an item public&lt;/li&gt;
&lt;li&gt;&lt;code&gt;use&lt;/code&gt; — Import items from other modules&lt;/li&gt;
&lt;li&gt;&lt;code&gt;crate&lt;/code&gt; — Reference the current crate or external crate&lt;/li&gt;
&lt;li&gt;&lt;code&gt;as&lt;/code&gt; — Rename or alias in imports&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="macros"&gt;Macros&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;macro_rules&lt;/code&gt;! — Define a declarative macro&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="type-operations"&gt;Type Operations&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;as&lt;/code&gt; — Type casting&lt;/li&gt;
&lt;li&gt;&lt;code&gt;_&lt;/code&gt; — Wildcard pattern or type placeholder&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="reserved-for-future-use-no-functionality-yet"&gt;Reserved for Future Use (No Functionality Yet)&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;abstract&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;become&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;box&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;do&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;final&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;macro&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;override&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;priv&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;try&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;typeof&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;unsized&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;virtual&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;yield&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item></channel></rss>