create account

Intro to Rust (Error Handling) by tensor

View this thread on: hive.blogpeakd.comecency.com
· @tensor · (edited)
$17.91
Intro to Rust (Error Handling)
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_
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 38 others
properties (23)
authortensor
permlinkintro-to-rust-error-handling
categorytechnology
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"}
created2017-12-16 04:01:18
last_update2017-12-16 04:04:03
depth0
children8
last_payout2017-12-23 04:01:18
cashout_time1969-12-31 23:59:59
total_payout_value13.906 HBD
curator_payout_value4.002 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,174
author_reputation87,856,203,149,624
root_title"Intro to Rust (Error Handling)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id23,703,332
net_rshares2,899,857,813,480
author_curate_reward""
vote details (102)
@minnowpowerup ·
@MinnowPowerUp summary from December 17, 2017
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
properties (22)
authorminnowpowerup
permlinkre-intro-to-rust-error-handling-20171217t073935
categorytechnology
json_metadata"{"app": "pysteem/0.5.4"}"
created2017-12-17 07:39:36
last_update2017-12-17 07:39:36
depth1
children0
last_payout2017-12-24 07:39:36
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length360
author_reputation5,690,564,233,955
root_title"Intro to Rust (Error Handling)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id23,847,838
net_rshares0
@postpromoter ·
re-tensor-intro-to-rust-error-handling-20171216t043457443z
You got a 0.61% upvote from @postpromoter courtesy of @tensor!
properties (22)
authorpostpromoter
permlinkre-tensor-intro-to-rust-error-handling-20171216t043457443z
categorytechnology
json_metadata{"app":"postpromoter/1.6.0"}
created2017-12-16 04:34:57
last_update2017-12-16 04:34:57
depth1
children0
last_payout2017-12-23 04:34:57
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length62
author_reputation12,722,616,650,811
root_title"Intro to Rust (Error Handling)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id23,705,608
net_rshares0
@qurator ·
Quratorcomment
<center>Qurator</center> | <center>Your Quality Content Curator</center>
-|-|
![](https://steemitimages.com/DQmNzJZFNXnViq9Ebmccf3rLi7kiYrcHFnFqeKK7QnWYtRs/COMMENT.png) | 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>
properties (22)
authorqurator
permlinkre-tensor-intro-to-rust-error-handling-20171216t041918175z
categorytechnology
json_metadata""
created2017-12-16 04:19:36
last_update2017-12-16 04:19:36
depth1
children0
last_payout2017-12-23 04:19:36
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length700
author_reputation1,640,921,824,290,780
root_title"Intro to Rust (Error Handling)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id23,704,563
net_rshares0
@rubai18 ·
i like your youtube channel.
properties (22)
authorrubai18
permlinkre-tensor-intro-to-rust-error-handling-20171216t062849962z
categorytechnology
json_metadata{"tags":["technology"],"app":"steemit/0.1"}
created2017-12-16 06:28:51
last_update2017-12-16 06:28:51
depth1
children2
last_payout2017-12-23 06:28:51
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length28
author_reputation1,470,615,377,148
root_title"Intro to Rust (Error Handling)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id23,714,719
net_rshares0
@tensor ·
Thank you.
👍  
properties (23)
authortensor
permlinkre-rubai18-re-tensor-intro-to-rust-error-handling-20171216t063736821z
categorytechnology
json_metadata{"tags":["technology"],"app":"steemit/0.1"}
created2017-12-16 06:37:33
last_update2017-12-16 06:37:33
depth2
children1
last_payout2017-12-23 06:37:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length10
author_reputation87,856,203,149,624
root_title"Intro to Rust (Error Handling)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id23,715,455
net_rshares2,144,111,686
author_curate_reward""
vote details (1)
@rubai18 ·
wlc
properties (22)
authorrubai18
permlinkre-tensor-re-rubai18-re-tensor-intro-to-rust-error-handling-20171216t064633412z
categorytechnology
json_metadata{"tags":["technology"],"app":"steemit/0.1"}
created2017-12-16 06:46:33
last_update2017-12-16 06:46:33
depth3
children0
last_payout2017-12-23 06:46:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length3
author_reputation1,470,615,377,148
root_title"Intro to Rust (Error Handling)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id23,716,163
net_rshares0
@tensor ·
@originalworks
properties (22)
authortensor
permlinkre-tensor-intro-to-rust-error-handling-20171216t055524979z
categorytechnology
json_metadata{"tags":["technology"],"users":["originalworks"],"app":"steemit/0.1"}
created2017-12-16 05:55:24
last_update2017-12-16 05:55:24
depth1
children1
last_payout2017-12-23 05:55:24
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length14
author_reputation87,856,203,149,624
root_title"Intro to Rust (Error Handling)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id23,711,931
net_rshares0
@originalworks ·
originalworks
The @OriginalWorks bot has determined this post by @tensor to be original material and upvoted(1.5%) it! 
<center>![ezgif.com-resize.gif](https://steemitimages.com/DQmaBi37A5oTnQ9NBLH8YU4jpvhhmFauyvgg3YRrEJwskM9/ezgif.com-resize.gif)</center> 

To call @OriginalWorks, simply reply to any post with @originalworks or !originalworks in your message!
properties (22)
authororiginalworks
permlinkre-re-tensor-intro-to-rust-error-handling-20171216t055524979z-20171216t055709
categorytechnology
json_metadata"{"app": "pysteem/0.5.4"}"
created2017-12-16 05:57:12
last_update2017-12-16 05:57:12
depth2
children0
last_payout2017-12-23 05:57:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length348
author_reputation79,292,026,602,057
root_title"Intro to Rust (Error Handling)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id23,712,077
net_rshares0