Rust has no `Nil` or `Null` values in it. This design decision echoes throughout many of the other parts of the language and it especially effects how we handle errors in Rust. We can use the `Option` and the `Result` enumerations to help us get more information about the types of data that are flowing through our program. We can use them to further wrap and unwrap our values and errors. These types of abstractions come from languages like Haskell and Elm, both of which have very strong type systems and emphasize type safety to help the user write both fast and safe code. In this video, we explore these ideas and of the ways that Rust handles them. <iframe width="560" height="315" src="https://www.youtube.com/embed/mhw-x5Q_-z0" frameborder="0" gesture="media" allow="encrypted-media" allowfullscreen></iframe> _If you enjoy the video, feel free to follow me on Steemit or on YouTube to get updates on the channel as well as more content._ _If you like what I do, tips and upvotes are welcome: ETH: 0xE448a8DDA5886C49d35B191B2F20630c103024c8 LTC: LXsKxF5JhmMtKgqfcUFdvcXVwiaSqxN9cP_ _Also, feel free to check out my channel for videos on Go, Elixir and Elm_
author | tensor |
---|---|
permlink | intro-to-rust-error-handling |
category | technology |
json_metadata | {"tags":["technology","steemstem","science","programming","utopian-io"],"image":["https://img.youtube.com/vi/mhw-x5Q_-z0/0.jpg"],"links":["https://www.youtube.com/embed/mhw-x5Q_-z0"],"app":"steemit/0.1","format":"markdown"} |
created | 2017-12-16 04:01:18 |
last_update | 2017-12-16 04:04:03 |
depth | 0 |
children | 8 |
last_payout | 2017-12-23 04:01:18 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 13.906 HBD |
curator_payout_value | 4.002 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 1,174 |
author_reputation | 87,856,203,149,624 |
root_title | "Intro to Rust (Error Handling)" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 23,703,332 |
net_rshares | 2,899,857,813,480 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
fminerten | 0 | 189,187,702,365 | 5% | ||
steempty | 0 | 135,875,382,591 | 5% | ||
pharesim | 0 | 106,133,484,255 | 0.03% | ||
lafona-miner | 0 | 202,080,629,922 | 5% | ||
kushed | 0 | 37,719,300,241 | 2% | ||
xeroc | 0 | 883,232,062 | 0.6% | ||
steem-id | 0 | 6,447,535,726 | 0.6% | ||
bue | 0 | 27,528,094,580 | 100% | ||
gregory-f | 0 | 252,187,537 | 0.48% | ||
blakemiles84 | 0 | 4,345,465,374 | 0.6% | ||
samether | 0 | 55,733,045 | 0.6% | ||
anwenbaumeister | 0 | 50,883,757,115 | 2% | ||
isteemit | 0 | 1,098,892,038 | 0.12% | ||
phenom | 0 | 543,227,041 | 0.6% | ||
liberosist | 0 | 132,398,762,000 | 2% | ||
gomeravibz | 0 | 1,997,483,643 | 0.24% | ||
cryptoninja | 0 | 85,020,405 | 1% | ||
toxichan | 0 | 495,045,062 | 2% | ||
timsaid | 0 | 180,893,037,284 | 2% | ||
kyriacos | 0 | 22,917,308,427 | 5% | ||
lemouth | 0 | 27,268,055,242 | 10% | ||
rjbauer85 | 0 | 332,999,416 | 10% | ||
lamouthe | 0 | 1,261,352,693 | 10% | ||
dan-bn | 0 | 4,528,007,030 | 0.6% | ||
funnyman | 0 | 2,006,395,125 | 0.2% | ||
steemedia | 0 | 213,319,003 | 2% | ||
meerkat | 0 | 23,043,227,085 | 2% | ||
curie | 0 | 100,882,779,893 | 2% | ||
cebymaster | 0 | 264,682,184 | 2% | ||
techslut | 0 | 43,802,146,263 | 3% | ||
hendrikdegrote | 0 | 1,080,678,433,384 | 2% | ||
steemstem | 0 | 107,662,422,303 | 10% | ||
oleg326756 | 0 | 250,125,152 | 0.24% | ||
cotidiana | 0 | 237,487,749 | 2% | ||
foundation | 0 | 916,751,098 | 10% | ||
ethandsmith | 0 | 2,222,200,341 | 0.5% | ||
the-devil | 0 | 2,243,134,680 | 10% | ||
dna-replication | 0 | 2,766,249,441 | 10% | ||
pacokam8 | 0 | 69,663,996 | 0.4% | ||
jamhuery | 0 | 4,579,214,880 | 10% | ||
jhagi.bhai | 0 | 91,437,882 | 0.2% | ||
scrooger | 0 | 194,953,788 | 0.36% | ||
kingyus | 0 | 114,592,992 | 5% | ||
papadimos | 0 | 2,323,264,813 | 10% | ||
mobbs | 0 | 13,801,614,100 | 10% | ||
bp423 | 0 | 596,481,068 | 2% | ||
oscarcc89 | 0 | 100,120,010 | 0.2% | ||
kenchung | 0 | 1,139,020,339 | 2% | ||
arrliinn | 0 | 541,548,681 | 2% | ||
robertvogt | 0 | 135,379,144 | 0.2% | ||
diggerdugg | 0 | 191,787,165 | 2% | ||
derosnec | 0 | 72,699,141 | 0.24% | ||
kerriknox | 0 | 35,985,527,507 | 10% | ||
alexander.alexis | 0 | 873,371,969 | 5% | ||
tensor | 0 | 8,936,559,921 | 100% | ||
erangvee | 0 | 1,614,032,050 | 2% | ||
rockeynayak | 0 | 65,064,460 | 10% | ||
coffeedrinker51 | 0 | 4,029,621,644 | 20% | ||
nitesh9 | 0 | 2,247,406,629 | 10% | ||
dante31 | 0 | 55,487,075 | 2% | ||
himal | 0 | 484,823,747 | 10% | ||
nelinoeva | 0 | 141,341,787 | 1.08% | ||
nafazul | 0 | 1,771,647,631 | 100% | ||
ovij | 0 | 368,986,491 | 2% | ||
gamesjoyce | 0 | 167,914,623 | 1% | ||
azirgraff | 0 | 5,764,109,179 | 6% | ||
angelinaa | 0 | 169,452,672 | 10% | ||
horpey | 0 | 152,068,784 | 2% | ||
somethingburger | 0 | 584,488,372 | 10% | ||
rubai18 | 0 | 2,221,877,395 | 100% | ||
theleapingkoala | 0 | 82,479,824 | 0.24% | ||
originalworks | 0 | 7,896,246,553 | 1.5% | ||
webresultat | 0 | 197,599,248 | 2% | ||
olichidja | 0 | 622,361,703 | 100% | ||
statavkj | 0 | 622,155,596 | 100% | ||
makaschayni | 0 | 615,320,000 | 100% | ||
kosyadrreg | 0 | 615,320,000 | 100% | ||
official-hord | 0 | 1,136,836,533 | 100% | ||
minnowpowerup | 0 | 45,570,033,819 | 5.76% | ||
mortoeze | 0 | 615,320,000 | 100% | ||
qurator | 0 | 16,588,753,804 | 1.2% | ||
sledyakhov | 0 | 615,320,000 | 100% | ||
rachelsmantra | 0 | 515,962,256 | 10% | ||
gra | 0 | 3,470,336,177 | 10% | ||
tmitinen | 0 | 1,566,712,042 | 100% | ||
socialspace | 0 | 955,101,274 | 2% | ||
janieym | 0 | 544,558,200 | 100% | ||
kedi | 0 | 2,470,039,243 | 10% | ||
postpromoter | 0 | 200,626,510,180 | 0.61% | ||
chnorris | 0 | 67,406,290 | 60% | ||
jasimg | 0 | 3,197,345,757 | 2% | ||
ninolatino | 0 | 119,622,549 | 2% | ||
raci | 0 | 104,597,118 | 2% | ||
ongoingwow | 0 | 396,400,698 | 8% | ||
amavi | 0 | 1,162,999,091 | 2% | ||
geekpowered | 0 | 4,234,323,533 | 2% | ||
gentleshaid | 0 | 2,223,769,222 | 10% | ||
saradeth | 0 | 615,320,000 | 100% | ||
rantar | 0 | 6,233,599,105 | 100% | ||
besick | 0 | 2,061,970,396 | 100% | ||
kermodebear | 0 | 1,151,815,938 | 100% | ||
codeworkr | 0 | 975,068,601 | 100% |
You have collected your daily Power Up! This post received an upvote worth of 0.19$. [Learn how to Power Up Smart here!](https://steemit.com/steemit/@minnowpowerup/introducing-minnowpowerup-a-paid-subscription-based-daily-upvote-bot-that-draws-its-power-from-a-delegation-pool) https://steemitimages.com/DQmQxdQrRLJQjMQFKJgGLQT8tnub5SogfuvUNmkmNyqLrbd/logo.png
author | minnowpowerup |
---|---|
permlink | re-intro-to-rust-error-handling-20171217t073935 |
category | technology |
json_metadata | "{"app": "pysteem/0.5.4"}" |
created | 2017-12-17 07:39:36 |
last_update | 2017-12-17 07:39:36 |
depth | 1 |
children | 0 |
last_payout | 2017-12-24 07:39:36 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 360 |
author_reputation | 5,690,564,233,955 |
root_title | "Intro to Rust (Error Handling)" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 23,847,838 |
net_rshares | 0 |
You got a 0.61% upvote from @postpromoter courtesy of @tensor!
author | postpromoter |
---|---|
permlink | re-tensor-intro-to-rust-error-handling-20171216t043457443z |
category | technology |
json_metadata | {"app":"postpromoter/1.6.0"} |
created | 2017-12-16 04:34:57 |
last_update | 2017-12-16 04:34:57 |
depth | 1 |
children | 0 |
last_payout | 2017-12-23 04:34:57 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 62 |
author_reputation | 12,722,616,650,811 |
root_title | "Intro to Rust (Error Handling)" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 23,705,608 |
net_rshares | 0 |
<center>Qurator</center> | <center>Your Quality Content Curator</center> -|-|  | This post has been upvoted and given the stamp of authenticity by @qurator. To join the quality content creators and receive daily upvotes click [here](https://steemit.com/qurator/@qurator/qurator-update-cheaper-tier-access-and-increased-registration-fee) for more info. <center>*Qurator's exclusive support bot is now live. For more info click [HERE](https://steemit.com/qurator/@qurator/qurator-support-bot-alive-and-active-welcome-to-qustodian) or send some SBD and your link to @qustodian to get even more support.*</center>
author | qurator |
---|---|
permlink | re-tensor-intro-to-rust-error-handling-20171216t041918175z |
category | technology |
json_metadata | "" |
created | 2017-12-16 04:19:36 |
last_update | 2017-12-16 04:19:36 |
depth | 1 |
children | 0 |
last_payout | 2017-12-23 04:19:36 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 700 |
author_reputation | 1,640,947,069,105,113 |
root_title | "Intro to Rust (Error Handling)" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 23,704,563 |
net_rshares | 0 |
i like your youtube channel.
author | rubai18 |
---|---|
permlink | re-tensor-intro-to-rust-error-handling-20171216t062849962z |
category | technology |
json_metadata | {"tags":["technology"],"app":"steemit/0.1"} |
created | 2017-12-16 06:28:51 |
last_update | 2017-12-16 06:28:51 |
depth | 1 |
children | 2 |
last_payout | 2017-12-23 06:28:51 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 28 |
author_reputation | 1,470,615,377,148 |
root_title | "Intro to Rust (Error Handling)" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 23,714,719 |
net_rshares | 0 |
Thank you.
author | tensor |
---|---|
permlink | re-rubai18-re-tensor-intro-to-rust-error-handling-20171216t063736821z |
category | technology |
json_metadata | {"tags":["technology"],"app":"steemit/0.1"} |
created | 2017-12-16 06:37:33 |
last_update | 2017-12-16 06:37:33 |
depth | 2 |
children | 1 |
last_payout | 2017-12-23 06:37:33 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 10 |
author_reputation | 87,856,203,149,624 |
root_title | "Intro to Rust (Error Handling)" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 23,715,455 |
net_rshares | 2,144,111,686 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
rubai18 | 0 | 2,144,111,686 | 100% |
wlc
author | rubai18 |
---|---|
permlink | re-tensor-re-rubai18-re-tensor-intro-to-rust-error-handling-20171216t064633412z |
category | technology |
json_metadata | {"tags":["technology"],"app":"steemit/0.1"} |
created | 2017-12-16 06:46:33 |
last_update | 2017-12-16 06:46:33 |
depth | 3 |
children | 0 |
last_payout | 2017-12-23 06:46:33 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 3 |
author_reputation | 1,470,615,377,148 |
root_title | "Intro to Rust (Error Handling)" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 23,716,163 |
net_rshares | 0 |
@originalworks
author | tensor |
---|---|
permlink | re-tensor-intro-to-rust-error-handling-20171216t055524979z |
category | technology |
json_metadata | {"tags":["technology"],"users":["originalworks"],"app":"steemit/0.1"} |
created | 2017-12-16 05:55:24 |
last_update | 2017-12-16 05:55:24 |
depth | 1 |
children | 1 |
last_payout | 2017-12-23 05:55:24 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 14 |
author_reputation | 87,856,203,149,624 |
root_title | "Intro to Rust (Error Handling)" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 23,711,931 |
net_rshares | 0 |
The @OriginalWorks bot has determined this post by @tensor to be original material and upvoted(1.5%) it! <center></center> To call @OriginalWorks, simply reply to any post with @originalworks or !originalworks in your message!
author | originalworks |
---|---|
permlink | re-re-tensor-intro-to-rust-error-handling-20171216t055524979z-20171216t055709 |
category | technology |
json_metadata | "{"app": "pysteem/0.5.4"}" |
created | 2017-12-16 05:57:12 |
last_update | 2017-12-16 05:57:12 |
depth | 2 |
children | 0 |
last_payout | 2017-12-23 05:57:12 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 348 |
author_reputation | 79,292,026,602,057 |
root_title | "Intro to Rust (Error Handling)" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 23,712,077 |
net_rshares | 0 |