{"guid":"1adcd4eb-7655-5f62-9917-add6bf2b2eee","title":"Immutable Data Structures and why You want them","subtitle":null,"slug":"rustfest18-3-immutable_data_structures_and_why_you_want_them","link":"https://c3voc.de","description":"There’s a discrepancy between the careful attention to mutability and immutability in Rust itself and the data structures available in the standard library. The only way to update a Vec with an immutable ref is to clone it first, which could get expensive. But what else can you do?  Turns out there’s a number of data structures out there that make it cheap and easy to do immutable copies and updates. Some are so simple it’s ridiculous, some are anything but, and we’re going to dive into some of the more useful ones, how they work, why you should care, and how to best implement them in Rust.","original_language":"eng","persons":["Bodil Stokke"],"tags":["rustfest18","3"],"view_count":229,"promoted":false,"date":"2018-05-26T00:00:00.000+02:00","release_date":"2018-05-26T02:00:00.000+02:00","updated_at":"2026-03-03T14:30:06.623+01:00","length":1834,"duration":1834,"thumb_url":"https://static.media.ccc.de/media/conferences/rustfest/2018/3-hd.jpg","poster_url":"https://static.media.ccc.de/media/conferences/rustfest/2018/3-hd_preview.jpg","timeline_url":"https://static.media.ccc.de/media/conferences/rustfest/2018/1adcd4eb-7655-5f62-9917-add6bf2b2eee-timeline.jpg","thumbnails_url":"https://static.media.ccc.de/media/conferences/rustfest/2018/1adcd4eb-7655-5f62-9917-add6bf2b2eee-thumbnails.vtt","frontend_link":"https://media.ccc.de/v/rustfest18-3-immutable_data_structures_and_why_you_want_them","url":"https://api.media.ccc.de/public/events/1adcd4eb-7655-5f62-9917-add6bf2b2eee","conference_title":"Rustfest 2018 Paris","conference_url":"https://api.media.ccc.de/public/conferences/rustfest18","related":[{"event_id":5545,"event_guid":"33a78b77-a1fa-5bf8-a719-15a8663593dd","weight":17},{"event_id":5546,"event_guid":"069a6809-2727-55c7-b584-03776939ee96","weight":20},{"event_id":5547,"event_guid":"69d9379b-5f4d-53c7-a03a-4db98f105781","weight":12},{"event_id":5549,"event_guid":"7c66d3ba-35e9-52ed-9cdd-6266ee1ca114","weight":18},{"event_id":5550,"event_guid":"285f1241-3400-50d1-9d5d-dbaeb272dabe","weight":16},{"event_id":5551,"event_guid":"1cde6c4f-3c96-5b27-ba65-a02fbe4138a3","weight":17},{"event_id":5554,"event_guid":"41ebd647-9d5f-5779-9dba-3d3623b673bb","weight":12},{"event_id":5557,"event_guid":"d6e55ac4-08b0-5c60-a88c-daa5496dfbf6","weight":16}],"recordings":[{"size":666,"length":1834,"mime_type":"video/mp4","language":"eng","filename":"rustfest18-3-eng-Immutable_Data_Structures_and_why_You_want_them_hd.mp4","state":"new","folder":"h264-hd","high_quality":true,"width":1920,"height":1080,"updated_at":"2018-05-26T21:38:57.110+02:00","recording_url":"https://cdn.media.ccc.de/events/rustfest/2018/h264-hd/rustfest18-3-eng-Immutable_Data_Structures_and_why_You_want_them_hd.mp4","url":"https://api.media.ccc.de/public/recordings/26005","event_url":"https://api.media.ccc.de/public/events/1adcd4eb-7655-5f62-9917-add6bf2b2eee","conference_url":"https://api.media.ccc.de/public/conferences/rustfest18"},{"size":92,"length":1834,"mime_type":"video/mp4","language":"eng","filename":"rustfest18-3-eng-Immutable_Data_Structures_and_why_You_want_them_sd.mp4","state":"new","folder":"h264-sd","high_quality":false,"width":720,"height":576,"updated_at":"2018-05-26T21:56:41.083+02:00","recording_url":"https://cdn.media.ccc.de/events/rustfest/2018/h264-sd/rustfest18-3-eng-Immutable_Data_Structures_and_why_You_want_them_sd.mp4","url":"https://api.media.ccc.de/public/recordings/26023","event_url":"https://api.media.ccc.de/public/events/1adcd4eb-7655-5f62-9917-add6bf2b2eee","conference_url":"https://api.media.ccc.de/public/conferences/rustfest18"},{"size":27,"length":1829,"mime_type":"audio/mpeg","language":"eng","filename":"rustfest18-3-eng-Immutable_Data_Structures_and_why_You_want_them_mp3.mp3","state":"new","folder":"mp3","high_quality":false,"width":0,"height":0,"updated_at":"2018-05-26T21:57:09.894+02:00","recording_url":"https://cdn.media.ccc.de/events/rustfest/2018/mp3/rustfest18-3-eng-Immutable_Data_Structures_and_why_You_want_them_mp3.mp3","url":"https://api.media.ccc.de/public/recordings/26024","event_url":"https://api.media.ccc.de/public/events/1adcd4eb-7655-5f62-9917-add6bf2b2eee","conference_url":"https://api.media.ccc.de/public/conferences/rustfest18"},{"size":20,"length":1829,"mime_type":"audio/opus","language":"eng","filename":"rustfest18-3-eng-Immutable_Data_Structures_and_why_You_want_them_opus.opus","state":"new","folder":"opus","high_quality":false,"width":0,"height":0,"updated_at":"2018-05-26T21:57:49.463+02:00","recording_url":"https://cdn.media.ccc.de/events/rustfest/2018/opus/rustfest18-3-eng-Immutable_Data_Structures_and_why_You_want_them_opus.opus","url":"https://api.media.ccc.de/public/recordings/26025","event_url":"https://api.media.ccc.de/public/events/1adcd4eb-7655-5f62-9917-add6bf2b2eee","conference_url":"https://api.media.ccc.de/public/conferences/rustfest18"},{"size":80,"length":1834,"mime_type":"video/webm","language":"eng","filename":"rustfest18-3-eng-Immutable_Data_Structures_and_why_You_want_them_webm-sd.webm","state":"new","folder":"webm-sd","high_quality":false,"width":720,"height":576,"updated_at":"2018-05-26T21:58:36.688+02:00","recording_url":"https://cdn.media.ccc.de/events/rustfest/2018/webm-sd/rustfest18-3-eng-Immutable_Data_Structures_and_why_You_want_them_webm-sd.webm","url":"https://api.media.ccc.de/public/recordings/26026","event_url":"https://api.media.ccc.de/public/events/1adcd4eb-7655-5f62-9917-add6bf2b2eee","conference_url":"https://api.media.ccc.de/public/conferences/rustfest18"},{"size":241,"length":1834,"mime_type":"video/webm","language":"eng","filename":"rustfest18-3-eng-Immutable_Data_Structures_and_why_You_want_them_webm-hd.webm","state":"new","folder":"webm-hd","high_quality":true,"width":1920,"height":1080,"updated_at":"2018-05-26T22:01:17.544+02:00","recording_url":"https://cdn.media.ccc.de/events/rustfest/2018/webm-hd/rustfest18-3-eng-Immutable_Data_Structures_and_why_You_want_them_webm-hd.webm","url":"https://api.media.ccc.de/public/recordings/26028","event_url":"https://api.media.ccc.de/public/events/1adcd4eb-7655-5f62-9917-add6bf2b2eee","conference_url":"https://api.media.ccc.de/public/conferences/rustfest18"}]}