Listed as Free on Udemy when checked on 6 November 2026. No coupon or subscription trial is required for the listed lessons. Enrollment needs a Udemy account; availability can change.
About this course
Once you can create and run a small Rust program, the next challenge is making it respond to different values. This free English course by Ellie Sleightholm connects functions and control flow with keyboard input, command-line arguments and vectors. It gives a beginner a compact sequence for moving beyond fixed output toward programs that accept information and choose what to do with it.
This is Part Two of a three-part Rust series. Its six videos form two sections and total exactly one hour and thirty-one minutes. The instructor recommends watching the first part beforehand. Although one section is called Intermediate Concepts, the course’s overall source level is Beginner. The broad description refers to the whole series; installation fundamentals, structs and enums are not additional dedicated lessons in this part.
| Official course | Rust Programming Crash Course for Beginners (Part 2/3) |
|---|---|
| Created by | Ellie Sleightholm |
| Platform | Udemy |
| Language | English |
| Level | Beginner |
| Listed duration | 91 minutes; 6 lectures across 2 sections |
| Completion terms | Not included with a new free enrollment |
What you’ll learn
Follow how Rust functions receive typed parameters and return values. Explore conditions and loops, collect text from standard input, inspect arguments supplied when a program starts, and work with a vector whose length can change. Distinguish a demonstration that handles one expected input from a program prepared for missing or invalid data.
Skills you’ll gain
- Rust function structure
- Statements and expressions
- Conditional control flow
- Standard input basics
- Command-line arguments
- Vector operations
Use the editor as a learning aid
The opening lesson introduces the rust-analyzer extension in Visual Studio Code and uses the terminal to run Rust programs. Feedback inside an editor can help you locate a problem while you are writing, but it is still useful to understand the command being run and the message it produces. An extension assists the development workflow; it does not replace the underlying toolchain or establish that a program behaves correctly.
The material was updated in April 2023. Use current official setup documentation if extension installation or editor menus differ from the recording. This part builds on existing familiarity with files, variables, types and Cargo. If those ideas are unfamiliar, revisit them before combining input and control flow. Watching the course is free, while any optional editor purchase or external development service has its own terms.
Give each function a clear task
The functions lesson covers definitions, calls, typed parameters, return values, statements and expressions. Think of a function as a named operation with a purpose you can explain before reading its implementation. For each example, identify the information that enters it and the value, if any, that comes back. Keeping this contract clear makes it easier to understand a call elsewhere in the program.
Control flow then determines which operation runs and how often. The lesson includes if, else-if and else, comparisons, Boolean logic, loops, ranges and collection iteration. With a branching example, try values that satisfy each condition and a value that satisfies none of the earlier conditions. With a loop, describe both the first iteration and the stopping condition. Predicting these paths is more useful than merely reproducing the visible syntax.
Treat input as something to examine
The input lesson introduces std::io, a mutable String, read_line and expect. These details deserve separate attention. Reading a line stores text, rather than automatically producing a number suitable for arithmetic. The standard library’s read_line method appends to the supplied buffer and retains a trailing newline when one is present. If a program reuses that buffer, it needs a deliberate decision about preserving or clearing earlier content.
The operation returns a Result because reading input can fail. Calling expect extracts a successful value but panics on an error; it is not a recovery strategy for every possible failure. Use the lesson to understand the basic interaction, then consider how a larger program should respond to unsuccessful reads or invalid input. These distinctions are current technical context, not a claim that every error-handling case is demonstrated in the recording.
Connect arguments with collections
Command-line arguments provide another way for information to reach a program: they are supplied at startup rather than typed into an interactive prompt later. The lesson collects arguments through env::args and uses Cargo to run an example. When following it, distinguish the program’s invocation from the values you expect the program to process. Check what happens when an expected argument is absent before assuming that a particular position exists.
The vectors lesson covers creating a collection, adding and removing elements, checking length, indexing and iteration. A vector stores elements of one type and can grow or shrink. Indexing beyond its current length panics; using get returns an Option that allows the missing-element case to be handled explicitly. Growing a collection and safely choosing an item are related but separate tasks. An example that works with three values may need a different branch when the collection is empty.
Practice a complete small interaction
As an editorial extension, plan a tiny program that accepts several item labels, keeps them in a vector and prints a numbered list. Write down what should happen for an empty list and for a request for an unavailable item. This is a proposed practice task, not a supplied or tested course solution. The course is a bridge into these concepts, not a production command-line framework or a guarantee of professional proficiency. Further practice and explicit error handling remain part of building reliable applications.
Related courses for your next step
- Add a related skillBash Scripting
Focus: Script setup · Interpreter selection
Beginner
Compare course focus, level and study time
| Course | Level | Focus | Study time |
|---|---|---|---|
| This course — Free Rust Functions Course: Work with Input, Control Flow and Vectors | Beginner | Rust function structure · Statements and expressions · Conditional control flow | 91 minutes (Udemy listing) |
| Free Bash Scripting Course: Write Your First Linux Script | Beginner | Script setup · Interpreter selection · Shell builtins | 44 minutes (Udemy listing) |
Frequently asked questions
Should I start with Part One?
The instructor says the first part is highly beneficial. Familiarity with Rust files, variables, basic types and Cargo will make this sequence easier to follow.
Is the whole three-part series included here?
No. This course contains six videos about the editor extension, functions, control flow, user input, command-line arguments and vectors.
Does expect recover from an input error?
No. For a Result, expect returns the successful value or panics on an error. A program that needs to recover must handle its error cases deliberately.
Questions & discussion
Share a useful question or correction. Comments appear after moderation. Please avoid personal or sensitive information.