{"id":16867562,"url":"https://github.com/chrisduerr/calloop-notify","last_synced_at":"2025-04-11T10:17:00.551Z","repository":{"id":57746959,"uuid":"521841439","full_name":"chrisduerr/calloop-notify","owner":"chrisduerr","description":"Calloop adapter for Notify","archived":false,"fork":false,"pushed_at":"2022-08-06T04:16:36.000Z","size":10,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T07:03:51.480Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chrisduerr.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}},"created_at":"2022-08-06T03:59:51.000Z","updated_at":"2022-08-13T02:10:41.000Z","dependencies_parsed_at":"2022-09-03T00:21:02.540Z","dependency_job_id":null,"html_url":"https://github.com/chrisduerr/calloop-notify","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisduerr%2Fcalloop-notify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisduerr%2Fcalloop-notify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisduerr%2Fcalloop-notify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisduerr%2Fcalloop-notify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chrisduerr","download_url":"https://codeload.github.com/chrisduerr/calloop-notify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247994116,"owners_count":21030049,"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-13T14:54:50.499Z","updated_at":"2025-04-11T10:17:00.435Z","avatar_url":"https://github.com/chrisduerr.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# calloop-notify\n\n[Calloop] adapter for [Notify].\n\nThis crate provides an `EventSource` implementation for Notify, allowing easy\nintegration into the Calloop event source. This makes it possible to easily\nwatch multiple files in a non-blocking fashion, using the native operating\nsystem APIs.\n\n[Calloop]: https://github.com/Smithay/calloop\n[notify]: https://github.com/notify-rs/notify\n\n## Example\n\n```rust\nuse std::path::Path;\n\nuse calloop::EventLoop;\nuse calloop_notify::notify::{RecursiveMode, Watcher};\nuse calloop_notify::NotifySource;\n\nfn main() {\n    // Create calloop event loop.\n    let mut event_loop = EventLoop::try_new().unwrap();\n    let loop_handle = event_loop.handle();\n\n    // Watch current directory recursively.\n    let mut notify_source = NotifySource::new().unwrap();\n    notify_source.watch(Path::new(\".\"), RecursiveMode::Recursive).unwrap();\n\n    // Insert notify source into calloop.\n    loop_handle\n        .insert_source(notify_source, |event, _, _| {\n            println!(\"Notify Event: {event:?}\");\n        })\n        .unwrap();\n\n    // Dispatch event loop.\n    loop {\n        event_loop.dispatch(None, \u0026mut ()).unwrap();\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrisduerr%2Fcalloop-notify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchrisduerr%2Fcalloop-notify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrisduerr%2Fcalloop-notify/lists"}