<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Structs on AI VOID</title><link>https://ai-blog.noorshomelab.dev/tags/structs/</link><description>Recent content in Structs on AI VOID</description><generator>Hugo</generator><language>en</language><lastBuildDate>Fri, 20 Mar 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://ai-blog.noorshomelab.dev/tags/structs/index.xml" rel="self" type="application/rss+xml"/><item><title>Chapter 5: Structs &amp;amp; Classes - Building Data Models</title><link>https://ai-blog.noorshomelab.dev/mastering-swift-2026/05-structs-classes-building-data-models/</link><pubDate>Thu, 26 Feb 2026 00:00:00 +0000</pubDate><guid>https://ai-blog.noorshomelab.dev/mastering-swift-2026/05-structs-classes-building-data-models/</guid><description>&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;Welcome back, future Swift maestros! In the previous chapters, we laid the groundwork with variables, constants, basic data types, and functions. Now, it&amp;rsquo;s time to level up our ability to organize and model data in a meaningful way. Imagine trying to describe a person, a car, or a recipe using just individual variables – it would quickly become a tangled mess!&lt;/p&gt;
&lt;p&gt;This chapter introduces two of Swift&amp;rsquo;s most fundamental building blocks for creating custom data types: &lt;strong&gt;structs&lt;/strong&gt; and &lt;strong&gt;classes&lt;/strong&gt;. These powerful constructs allow us to bundle related properties (data) and methods (functions that operate on that data) into a single, cohesive unit. Understanding structs and classes is absolutely crucial for writing clean, efficient, and idiomatic Swift code, especially as you embark on building production-grade iOS applications.&lt;/p&gt;</description></item><item><title>Core Concepts: Structs, Enums, and Pattern Matching</title><link>https://ai-blog.noorshomelab.dev/rust-guide/core-concepts-structs-enums-pattern-matching/</link><pubDate>Sat, 25 Oct 2025 00:00:00 +0000</pubDate><guid>https://ai-blog.noorshomelab.dev/rust-guide/core-concepts-structs-enums-pattern-matching/</guid><description>&lt;h1 id="core-concepts-structs-enums-and-pattern-matching"&gt;Core Concepts: Structs, Enums, and Pattern Matching&lt;/h1&gt;
&lt;p&gt;As your programs grow, you&amp;rsquo;ll need ways to define custom data types that logically group related pieces of data. Rust provides &lt;code&gt;structs&lt;/code&gt; and &lt;code&gt;enums&lt;/code&gt; for this purpose. Combined with &lt;code&gt;pattern matching&lt;/code&gt;, these features allow you to write expressive, robust, and type-safe code.&lt;/p&gt;
&lt;h2 id="structs"&gt;Structs&lt;/h2&gt;
&lt;p&gt;Structs are custom data types that let you name and package together multiple related values into a meaningful group. Each piece of data in a struct is called a &lt;em&gt;field&lt;/em&gt;.&lt;/p&gt;</description></item><item><title>Chapter 6: Structs, Enums, and Powerful Pattern Matching</title><link>https://ai-blog.noorshomelab.dev/rust-mastery-2026/structs-enums-pattern-matching/</link><pubDate>Fri, 20 Mar 2026 00:00:00 +0000</pubDate><guid>https://ai-blog.noorshomelab.dev/rust-mastery-2026/structs-enums-pattern-matching/</guid><description>&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;Welcome back, Rustaceans! In our previous chapters, we laid the groundwork for understanding Rust&amp;rsquo;s core syntax, variables, and the unique concept of ownership. Now, it&amp;rsquo;s time to elevate our data modeling capabilities beyond simple scalars. Imagine trying to describe a person or a color using just individual &lt;code&gt;i32&lt;/code&gt;s or &lt;code&gt;String&lt;/code&gt;s – it would quickly become cumbersome and error-prone.&lt;/p&gt;
&lt;p&gt;This chapter introduces you to Rust&amp;rsquo;s powerful tools for creating custom data types: &lt;strong&gt;structs&lt;/strong&gt; and &lt;strong&gt;enums&lt;/strong&gt;. Structs allow you to group related pieces of data into a single, meaningful unit, much like objects in other languages (but without methods initially). Enums, short for enumerations, let you define a type that can be one of several possible variants, perfect for situations where a value can be &lt;em&gt;either&lt;/em&gt; this &lt;em&gt;or&lt;/em&gt; that.&lt;/p&gt;</description></item><item><title>Guided Project 1: Command-Line Todo Application</title><link>https://ai-blog.noorshomelab.dev/rust-guide/project-cli-todo-app/</link><pubDate>Sat, 25 Oct 2025 00:00:00 +0000</pubDate><guid>https://ai-blog.noorshomelab.dev/rust-guide/project-cli-todo-app/</guid><description>&lt;h1 id="guided-project-1-command-line-todo-application"&gt;Guided Project 1: Command-Line Todo Application&lt;/h1&gt;
&lt;p&gt;In this guided project, you&amp;rsquo;ll build a functional command-line todo application. This project will reinforce many concepts you&amp;rsquo;ve learned, including:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Structs and Enums for data modeling.&lt;/li&gt;
&lt;li&gt;Ownership and borrowing.&lt;/li&gt;
&lt;li&gt;Error handling with &lt;code&gt;Result&lt;/code&gt; and &lt;code&gt;Option&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;File I/O for persistent data storage.&lt;/li&gt;
&lt;li&gt;Basic command-line argument parsing.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Our todo application will allow users to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Add a new todo item.&lt;/li&gt;
&lt;li&gt;Mark an item as completed.&lt;/li&gt;
&lt;li&gt;List all todo items (showing completed status).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We&amp;rsquo;ll store todo items in a simple JSON file.&lt;/p&gt;</description></item></channel></rss>