Skip to content
Artwork for Learning Rust For Busy People
Learning Rust For Busy People · April 11 · 21 min

#6 – minised, part 1

Use Rust to develop a miniature version of the “sed” command-line utility, part 1. Covers topics that include a subset of functionality for the “sed” command-line utility that’s used for replacing text, the scope of features that we’ll include in the miniature “sed” utility that we’re building, how to define a “struct” in Rust, how to leverage the “Option” enum for a value that may be either something or nothing, how to instantiate a “struct” in Rust via an associated function in an implementation block, how to bring a “struct” into scope in the binary crate, and how to use the “unwrap_or_else” method on a “Result” enum and define a “closure”. Find more information about this podcast and the practical code examples here: https://joshroot.github.io/learning-rust-for-busy-people-podcast Manual for the “sed” utility: https://www.gnu.org/software/sed/manual/sed.html This is a public episode. If you would like to discuss this with other subscribers or get access to bonus episodes, visit learningrustforbusypeople.substack.com

0:00-21:44

transcript

No transcript — this publisher did not publish one.

show notes

Use Rust to develop a miniature version of the “sed” command-line utility, part 1. Covers topics that include a subset of functionality for the “sed” command-line utility that’s used for replacing text, the scope of features that we’ll include in the miniature “sed” utility that we’re building, how to define a “struct” in Rust, how to leverage the “Option” enum for a value that may be either something or nothing, how to instantiate a “struct” in Rust via an associated function in an implementation block, how to bring a “struct” into scope in the binary crate, and how to use the “unwrap_or_else” method on a “Result” enum and define a “closure”.

Find more information about this podcast and the practical code examples here: https://joshroot.github.io/learning-rust-for-busy-people-podcast

Manual for the “sed” utility: https://www.gnu.org/software/sed/manual/sed.html



This is a public episode. If you would like to discuss this with other subscribers or get access to bonus episodes, visit learningrustforbusypeople.substack.com
links3