{"id":25409604,"url":"https://github.com/aabbtree77/ownership","last_synced_at":"2025-04-14T01:17:47.843Z","repository":{"id":277705717,"uuid":"933259017","full_name":"aabbtree77/ownership","owner":"aabbtree77","description":"Testing the borrow checker.","archived":false,"fork":false,"pushed_at":"2025-03-08T00:18:51.000Z","size":1852,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-14T01:17:38.560Z","etag":null,"topics":["analogy","borrow-checker","chatgpt4","education","examples","immutability","ownership"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aabbtree77.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-15T14:36:33.000Z","updated_at":"2025-03-08T00:18:54.000Z","dependencies_parsed_at":"2025-02-15T15:43:01.907Z","dependency_job_id":null,"html_url":"https://github.com/aabbtree77/ownership","commit_stats":null,"previous_names":["aabbtree77/ownership"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aabbtree77%2Fownership","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aabbtree77%2Fownership/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aabbtree77%2Fownership/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aabbtree77%2Fownership/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aabbtree77","download_url":"https://codeload.github.com/aabbtree77/ownership/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248804824,"owners_count":21164135,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["analogy","borrow-checker","chatgpt4","education","examples","immutability","ownership"],"created_at":"2025-02-16T09:21:07.163Z","updated_at":"2025-04-14T01:17:47.835Z","avatar_url":"https://github.com/aabbtree77.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e \"I've got thirteen channels of shit on the T.V. to choose from...\"\n\u003e\n\u003e — *Pink Floyd, 1979*\n\n## Introduction\n\nThe codes show numerous ways to modify a list in Rust, to see what the borrow checker is about.\n\n## Basic\n\n```console\ncd basic\nrustc basic.rs \u0026\u0026 ./basic\n```\n\n1. Mutable Borrow - Safe lock: You open, modify, and close it.\n2. Immutable Borrow - Hotel room: You can look but not change anything.\n3. Ownership Transfer - Moving van: You give away the whole thing.\n\n## Advanced\n\n```console\ncd advanced\ncargo run\n```\n\n1. Mutable Borrow - Safe lock: You open, modify, and close it.\n2. Immutable Borrow - Hotel room: You can look but not change anything.\n3. Ownership Transfer - Moving van: You give away the whole thing.\n4. Box - Storage unit: You keep ownership but store it elsewhere.\n5. Rc - Shared Library: Multiple users can read it but not modify it.\n6. Arc - Secure Webpage: Many threads access read-only content.\n7. RefCell - Restroom: Multiple access, but only one can modify at a time.\n8. Mutex - Safe Lock: One at a time access in multi-threaded scenarios.\n9. Async - Server request queue: Processing data asynchronously.\n10. Async Lifetime - Managing a connection that outlives a function.\n11. Gc - Smart Trash Bin: It will be cleaned when unused.\n\n \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faabbtree77%2Fownership","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faabbtree77%2Fownership","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faabbtree77%2Fownership/lists"}