Intro to Rust (Vectors, Hashmaps, Casting, If-let, while-let, and the Result Enum) by tensor

View this thread on steempeak.com
· @tensor · (edited)
$20.12
Intro to Rust (Vectors, Hashmaps, Casting, If-let, while-let, and the Result Enum)
<html>
<p>In this tutorial video, we look to filling a few of the gaps in our knowledge. &nbsp;We look at the last major collection types in Rust, the <strong>Vector</strong> and the <strong>Hashmap</strong>. &nbsp;Both the Vector and the Hashmap are very important collection types in Rust. &nbsp;We also look at how we can coerce a primitive from one type to another using <strong>Casting</strong>. &nbsp;This is a very useful construct because it lets us deal with some problems without having to re-create new types or new functions. &nbsp;We look at some syntactic sugar statements in the <strong>If-Let</strong> and <strong>While-Let</strong> match/binding statements and we talk about how they are not as exhaustive as a proper Match statement. &nbsp;They also allow us to write less verbose code as a result. Finally, we take a look at the <strong>Result Enum</strong> and how we can use it for error handling in a different way from the <strong>Option Enum</strong>. &nbsp;</p>
<p>&lt;iframe width="560" height="315" src="https://www.youtube.com/embed/oEy6bq8MTBc" frameborder="0" gesture="media" allow="encrypted-media" allowfullscreen&gt;&lt;/iframe&gt;</p>
<p>Edit: <em>I just realized after re-watching the video that I misspoke a few times in the video (calling While-let if-while etc). &nbsp;I was a exhausted when I made this video and I hope it does not detract from your learning experience.&nbsp;</em></p>
<p><br></p>
</html>
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 86 others
properties (23)
post_id19,515,242
authortensor
permlinkintro-to-rust-vectors-hashmaps-casting-if-let-while-let-and-the-result-enum
categorytechnology
json_metadata"{"app": "steemit/0.1", "format": "html", "links": ["https://www.youtube.com/embed/oEy6bq8MTBc"], "image": ["https://img.youtube.com/vi/oEy6bq8MTBc/0.jpg"], "tags": ["technology", "steemstem", "science", "programming", "steemeducation"]}"
created2017-12-05 08:52:12
last_update2017-12-05 09:18:24
depth0
children12
net_rshares5,478,767,536,035
last_payout2017-12-12 08:52:12
cashout_time1969-12-31 23:59:59
total_payout_value15.382 SBD
curator_payout_value4.740 SBD
pending_payout_value0.000 SBD
promoted0.500 SBD
body_length1,444
author_reputation87,767,420,253,600
root_title"Intro to Rust (Vectors, Hashmaps, Casting, If-let, while-let, and the Result Enum)"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (150)
@tensor ·
@originalworks
properties (22)
post_id19,516,401
authortensor
permlinkre-tensor-intro-to-rust-vectors-hashmaps-casting-if-let-while-let-and-the-result-enum-20171205t091248559z
categorytechnology
json_metadata"{"app": "steemit/0.1", "users": ["originalworks"], "tags": ["technology"]}"
created2017-12-05 09:12:45
last_update2017-12-05 09:12:45
depth1
children1
net_rshares0
last_payout2017-12-12 09:12:45
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length14
author_reputation87,767,420,253,600
root_title"Intro to Rust (Vectors, Hashmaps, Casting, If-let, while-let, and the Result Enum)"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@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)
post_id19,516,456
authororiginalworks
permlinkre-re-tensor-intro-to-rust-vectors-hashmaps-casting-if-let-while-let-and-the-result-enum-20171205t091248559z-20171205t091358
categorytechnology
json_metadata"{"app": "pysteem/0.5.4"}"
created2017-12-05 09:14:00
last_update2017-12-05 09:14:00
depth2
children0
net_rshares0
last_payout2017-12-12 09:14:00
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length348
author_reputation79,229,860,066,508
root_title"Intro to Rust (Vectors, Hashmaps, Casting, If-let, while-let, and the Result Enum)"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@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)
post_id19,516,436
authorqurator
permlinkre-tensor-intro-to-rust-vectors-hashmaps-casting-if-let-while-let-and-the-result-enum-20171205t091312213z
categorytechnology
json_metadata{}
created2017-12-05 09:13:30
last_update2017-12-05 09:13:30
depth1
children0
net_rshares0
last_payout2017-12-12 09:13:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length700
author_reputation582,848,328,798,482
root_title"Intro to Rust (Vectors, Hashmaps, Casting, If-let, while-let, and the Result Enum)"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@nikonmarshall ·
Great post @tensor, thanks for sharing
properties (22)
post_id19,518,340
authornikonmarshall
permlinkre-tensor-intro-to-rust-vectors-hashmaps-casting-if-let-while-let-and-the-result-enum-20171205t094750718z
categorytechnology
json_metadata"{"app": "steemit/0.1", "users": ["tensor"], "tags": ["technology"]}"
created2017-12-05 09:47:51
last_update2017-12-05 09:47:51
depth1
children1
net_rshares0
last_payout2017-12-12 09:47:51
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length38
author_reputation1,769,203,450,782
root_title"Intro to Rust (Vectors, Hashmaps, Casting, If-let, while-let, and the Result Enum)"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@tensor ·
thank you.
properties (22)
post_id19,546,505
authortensor
permlinkre-nikonmarshall-re-tensor-intro-to-rust-vectors-hashmaps-casting-if-let-while-let-and-the-result-enum-20171205t162317452z
categorytechnology
json_metadata"{"app": "steemit/0.1", "tags": ["technology"]}"
created2017-12-05 16:23:15
last_update2017-12-05 16:23:15
depth2
children0
net_rshares0
last_payout2017-12-12 16:23:15
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length10
author_reputation87,767,420,253,600
root_title"Intro to Rust (Vectors, Hashmaps, Casting, If-let, while-let, and the Result Enum)"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@palash01 ·
Really amazing post, I love it, got inspiration from you to start my journey.@tensor!
properties (22)
post_id19,546,734
authorpalash01
permlinkre-tensor-intro-to-rust-vectors-hashmaps-casting-if-let-while-let-and-the-result-enum-20171205t162605962z
categorytechnology
json_metadata"{"app": "steemit/0.1", "tags": ["technology"]}"
created2017-12-05 16:26:15
last_update2017-12-05 16:26:15
depth1
children2
net_rshares0
last_payout2017-12-12 16:26:15
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length85
author_reputation5,769,140,438,102
root_title"Intro to Rust (Vectors, Hashmaps, Casting, If-let, while-let, and the Result Enum)"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@tensor ·
Cool, Ill have to take a look myself.
properties (22)
post_id19,547,154
authortensor
permlinkre-palash01-re-tensor-intro-to-rust-vectors-hashmaps-casting-if-let-while-let-and-the-result-enum-20171205t163124345z
categorytechnology
json_metadata"{"app": "steemit/0.1", "tags": ["technology"]}"
created2017-12-05 16:31:24
last_update2017-12-05 16:31:24
depth2
children1
net_rshares0
last_payout2017-12-12 16:31:24
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length37
author_reputation87,767,420,253,600
root_title"Intro to Rust (Vectors, Hashmaps, Casting, If-let, while-let, and the Result Enum)"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@palash01 ·
Yes i agree @tensor
properties (22)
post_id19,549,383
authorpalash01
permlinkre-tensor-re-palash01-re-tensor-intro-to-rust-vectors-hashmaps-casting-if-let-while-let-and-the-result-enum-20171205t165959239z
categorytechnology
json_metadata"{"app": "steemit/0.1", "users": ["tensor"], "tags": ["technology"]}"
created2017-12-05 17:00:06
last_update2017-12-05 17:00:06
depth3
children0
net_rshares0
last_payout2017-12-12 17:00:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length19
author_reputation5,769,140,438,102
root_title"Intro to Rust (Vectors, Hashmaps, Casting, If-let, while-let, and the Result Enum)"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@steemitboard ·
Congratulations @tensor! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

[![](https://steemitimages.com/70x80/http://steemitboard.com/notifications/votes.png)](http://steemitboard.com/@tensor) Award for the number of upvotes
[![](https://steemitimages.com/70x80/http://steemitboard.com/notifications/comments.png)](http://steemitboard.com/@tensor) Award for the number of comments
[![](https://steemitimages.com/70x80/http://steemitboard.com/notifications/payout.png)](http://steemitboard.com/@tensor) Award for the total payout received

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click [here](https://steemit.com/@steemitboard)

If you no longer want to receive notifications, reply to this comment with the word `STOP`

> By upvoting this notification, you can help all Steemit users. Learn how [here](https://steemit.com/steemitboard/@steemitboard/http-i-cubeupload-com-7ciqeo-png)!
properties (22)
post_id19,551,449
authorsteemitboard
permlinksteemitboard-notify-tensor-20171205t172426000z
categorytechnology
json_metadata"{"image": ["https://steemitboard.com/img/notifications.png"]}"
created2017-12-05 17:24:24
last_update2017-12-05 17:24:24
depth1
children0
net_rshares0
last_payout2017-12-12 17:24:24
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length995
author_reputation38,705,954,145,809
root_title"Intro to Rust (Vectors, Hashmaps, Casting, If-let, while-let, and the Result Enum)"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@booster ·
<p>This post has received a 2.07 % upvote from @booster thanks to: @tensor.</p>
properties (22)
post_id19,554,218
authorbooster
permlinkre-tensor-intro-to-rust-vectors-hashmaps-casting-if-let-while-let-and-the-result-enum-20171205t175841650z
categorytechnology
json_metadata"{"app": "drotto/0.0.3rc1", "tags": ["technology"]}"
created2017-12-05 17:58:45
last_update2017-12-05 17:58:45
depth1
children0
net_rshares0
last_payout2017-12-12 17:58:45
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length80
author_reputation68,830,001,303,403
root_title"Intro to Rust (Vectors, Hashmaps, Casting, If-let, while-let, and the Result Enum)"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@sneaky-ninja ·
<p>This post has received a 5.87 % upvote from @sneaky-ninja thanks to: @tensor.</p>
properties (22)
post_id19,563,443
authorsneaky-ninja
permlinkre-tensor-intro-to-rust-vectors-hashmaps-casting-if-let-while-let-and-the-result-enum-20171205t195927356z
categorytechnology
json_metadata"{"app": "drotto/0.0.2d", "tags": ["technology"]}"
created2017-12-05 19:59:39
last_update2017-12-05 19:59:39
depth1
children0
net_rshares0
last_payout2017-12-12 19:59:39
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length85
author_reputation6,936,032,367,043
root_title"Intro to Rust (Vectors, Hashmaps, Casting, If-let, while-let, and the Result Enum)"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@minnowpowerup ·
@MinnowPowerUp summary from December 06, 2017
You have collected your daily Power Up! This post received an upvote worth of 0.25$.
[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)
post_id19,644,237
authorminnowpowerup
permlinkre-intro-to-rust-vectors-hashmaps-casting-if-let-while-let-and-the-result-enum-20171206t180324
categorytechnology
json_metadata"{"app": "pysteem/0.5.4"}"
created2017-12-06 18:03:24
last_update2017-12-06 18:03:24
depth1
children0
net_rshares0
last_payout2017-12-13 18:03:24
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length360
author_reputation5,695,810,810,737
root_title"Intro to Rust (Vectors, Hashmaps, Casting, If-let, while-let, and the Result Enum)"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000