{"id":21177278,"url":"https://github.com/codechain-io/rust-finally-block","last_synced_at":"2025-10-05T22:19:05.443Z","repository":{"id":57629428,"uuid":"179651435","full_name":"CodeChain-io/rust-finally-block","owner":"CodeChain-io","description":"Final block that is executed at the last","archived":false,"fork":false,"pushed_at":"2019-11-23T02:45:48.000Z","size":22,"stargazers_count":4,"open_issues_count":0,"forks_count":3,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-05T07:51:18.244Z","etag":null,"topics":["finally","rust"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/finally-block","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/CodeChain-io.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-05T09:07:14.000Z","updated_at":"2021-04-06T05:53:23.000Z","dependencies_parsed_at":"2022-09-18T05:50:31.345Z","dependency_job_id":null,"html_url":"https://github.com/CodeChain-io/rust-finally-block","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/CodeChain-io/rust-finally-block","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeChain-io%2Frust-finally-block","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeChain-io%2Frust-finally-block/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeChain-io%2Frust-finally-block/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeChain-io%2Frust-finally-block/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CodeChain-io","download_url":"https://codeload.github.com/CodeChain-io/rust-finally-block/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeChain-io%2Frust-finally-block/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264504570,"owners_count":23618824,"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":["finally","rust"],"created_at":"2024-11-20T17:15:23.262Z","updated_at":"2025-10-05T22:19:00.381Z","avatar_url":"https://github.com/CodeChain-io.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# finally-block [![Build Status](https://travis-ci.com/CodeChain-io/rust-finally-block.svg?branch=master)](https://travis-ci.com/CodeChain-io/rust-finally-block) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nFinally block is a block that is executed when it's dropped.\nIt helps a user write the deferred statements that should be executed, even when some statements return early.\n\n```rust\nfunction f(flag: \u0026AtomicBool) -\u003e Option\u003c()\u003e {\n    if some_condition {\n        let _f = finally(|| {\n            flag.store(true, Ordering::SeqCst);\n        });\n        some_function(flag)?;\n    } else {\n        another_function()?;\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodechain-io%2Frust-finally-block","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodechain-io%2Frust-finally-block","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodechain-io%2Frust-finally-block/lists"}