{"id":17902064,"url":"https://github.com/ramirezmike/oioo","last_synced_at":"2025-04-03T05:26:40.899Z","repository":{"id":145180506,"uuid":"273510468","full_name":"ramirezmike/OIOO","owner":"ramirezmike","description":"A data structure built in Rust intended as an alternative to FIFO or LIFO: One-in, One-out. ","archived":false,"fork":false,"pushed_at":"2021-10-18T01:53:53.000Z","size":3202,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-08T19:34:44.523Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ramirezmike.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2020-06-19T14:15:25.000Z","updated_at":"2021-10-18T01:53:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"221a628b-97fd-421c-a2fb-bcc2bcafbdb2","html_url":"https://github.com/ramirezmike/OIOO","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ramirezmike%2FOIOO","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ramirezmike%2FOIOO/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ramirezmike%2FOIOO/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ramirezmike%2FOIOO/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ramirezmike","download_url":"https://codeload.github.com/ramirezmike/OIOO/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246941815,"owners_count":20858393,"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":[],"created_at":"2024-10-28T16:04:41.033Z","updated_at":"2025-04-03T05:26:40.871Z","avatar_url":"https://github.com/ramirezmike.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OIOO\n\nA data structure built in Rust intended as an alternative to FIFO or LIFO: One-in, One-out. \n\n## Features\n  * stores items pushed into the data structure which can later be retrieved randomly\n  * each item is padded with a number of empty slots based on recommended social-distance guidelines \n  * max capacity of the OIOO is determined upon creation\n  * excess items added to the OIOO are contained in a queue which is automatically used to fill the main store when space becomes available.\n  * support for multiple Phases which alter the capabilities of the OIOO\n\n\n```rust\n// create a Phase Two (50%) capacity OIOO \nlet mut oioo = oioo::OIOO::\u003cusize\u003e::new(oioo::Phase::Two { occupancy: 10 }); \noioo.one_in(10); \noioo.one_in(20);\noioo.one_in(30);\noioo.one_in(40);\noioo.one_in(50);\noioo.one_in(60); // exceeds occupancy, contained in queue\n \n// random from 10, 20, 30, 40 or 50. The value \"60\" is automatically pushed into the empty space.\nprintln!(\"{}\", oioo.one_out().unwrap() as usize); \n\n// random from 10, 20, 30, 40, 50 or 60, excluding value printed above\nprintln!(\"{}\", oioo.one_out().unwrap() as usize); \n```\n\n![Example](example.jpg?raw=true \"Example\")\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Framirezmike%2Foioo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Framirezmike%2Foioo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Framirezmike%2Foioo/lists"}