{"id":18976302,"url":"https://github.com/quickwit-oss/census","last_synced_at":"2025-12-12T15:16:55.810Z","repository":{"id":57545533,"uuid":"139085653","full_name":"quickwit-oss/census","owner":"quickwit-oss","description":"Rust crate to keep a list of all of your living objects.","archived":false,"fork":false,"pushed_at":"2024-01-26T10:30:52.000Z","size":29,"stargazers_count":8,"open_issues_count":0,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-15T07:15:40.149Z","etag":null,"topics":[],"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/quickwit-oss.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":"2018-06-29T01:24:20.000Z","updated_at":"2025-04-03T13:02:14.000Z","dependencies_parsed_at":"2024-11-08T15:39:20.182Z","dependency_job_id":null,"html_url":"https://github.com/quickwit-oss/census","commit_stats":{"total_commits":16,"total_committers":5,"mean_commits":3.2,"dds":0.25,"last_synced_commit":"c85f984ca21023a73bb66e77861ae8e1ffbb369e"},"previous_names":["quickwit-inc/census"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quickwit-oss%2Fcensus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quickwit-oss%2Fcensus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quickwit-oss%2Fcensus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quickwit-oss%2Fcensus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/quickwit-oss","download_url":"https://codeload.github.com/quickwit-oss/census/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249228271,"owners_count":21233852,"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-11-08T15:23:31.038Z","updated_at":"2025-12-12T15:16:55.775Z","avatar_url":"https://github.com/quickwit-oss.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Census\n[![Build status](https://ci.appveyor.com/api/projects/status/5eb6wkt9jpr7qqaj/branch/master?svg=true)](https://ci.appveyor.com/project/fulmicoton/census/branch/master)\n\n\nThis crate makes it possible to create an inventory object that keeps track of\ninstances of a given type.\n\nIt is used in tantivy to get an accurate list of all of the files that are still in use\nby the index, and avoid garbage collecting them.\n\n\nThis `TrackedObject\u003cT\u003e` instance include some reference counting logic to ensure that\nthe object is removed from the inventory once the last instance is dropped.\n\n\n# Example\n\n```rust\n\nextern crate census;\n\nuse census::{Inventory, TrackedObject};\n\nfn main() {\n    let inventory = Inventory::new();\n\n    //  Each object tracked needs to be registered explicitely in the Inventory.\n    //  A `TrackedObject\u003cT\u003e` wrapper is then returned.\n    let one = inventory.track(\"one\".to_string());\n    let two = inventory.track(\"two\".to_string());\n\n    // A snapshot  of the list of living instances can be obtained...\n    // (no guarantee on their order)\n    let living_instances: Vec\u003cTrackedObject\u003cString\u003e\u003e = inventory.list();\n    assert_eq!(living_instances.len(), 2);\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquickwit-oss%2Fcensus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquickwit-oss%2Fcensus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquickwit-oss%2Fcensus/lists"}