File:The Why, What, and How of Pinning in Rust.webm

Summary

Description
English: With the Future trait stabilized and async/await coming soon, many more people are being exposed to the Pin type and its sibling trait Unpin. In this video, we dive deep into what these types are, why they are needed, how they work, and how to use them. We also dig into the connection to Futures and async/await, and discuss how you safely move from old code that does not use pinning to new code that does.

This is pretty dense and subtle material, but hopefully serves as a good and thorough overview of pinning in Rust. If you want to know how it all fits together, this stream probably has you covered! To help you navigate, here are the major transition points:

0:00:00 — Introduction 0:03:50 — What's the problem we're trying to solve? 0:28:19 — How does pinning help? 0:31:55 — What is Unpin? 0:35:14 — Working with pinned types 0:44:20 — An example of implementing Future 0:51:02 — Pin::new vs Pin::new_unchecked 0:59:16 — The problem with Drop 1:03:13 — Quick recap 1:07:26 — Why impl Unpin is safe 1:12:34 — Structural pinning 1:30:14 — The curious case of Box::pin 1:50:49 — Avoiding unsafe with pin-project 2:04:59 — Why is Pin::set okay? 2:08:03 — Pinning beyond Future 2:12:30 — Some quick questions 2:17:02 — Real-world examples of transitioning to Pin in tower 2:26:34 — pin-project and Drop 2:34:17 — Q&A!

You can vote for the next stream topic at https://jon.thesquareplanet.com/live-coding/ !

Live version with chat history here: https://www.youtube.com/watch?v=UuuhMDinEBg
Date
Source YouTube: The Why, What, and How of Pinning in Rust – View/save archived versions on archive.org and archive.todayCategory:Media from YouTube
Author Jon Gjengset

Licensing

This video, screenshot or audio excerpt was originally uploaded on YouTube under a CC BY license.
Their website states: "YouTube allows users to mark their videos with a Creative Commons CC BY license."
To the uploader: You must provide a link (URL) to the original file and the authorship information if available.
w:en:Creative Commons
attribution
This file is licensed under the Creative Commons Attribution 3.0 Unported license.
Attribution:
Jon Gjengset
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
Category:CC-BY-3.0#The%20Why,%20What,%20and%20How%20of%20Pinning%20in%20Rust.webm
Category:Media from YouTube#The%20Why,%20What,%20and%20How%20of%20Pinning%20in%20Rust.webm
This file, which was originally posted to an external website, has not yet been reviewed by an administrator or reviewer to confirm that the above license is valid. See Category:License review needed for further instructions.
Category:License review needed (video)#153340765 Category:Uploaded with video2commons Category:Videos of Rust (programming language)
Category:CC-BY-3.0 Category:License review needed (video) Category:Media from YouTube Category:Uploaded with video2commons Category:Videos of Rust (programming language)