{"id":15686897,"url":"https://github.com/lambdalisue/rs-async-utf8-decoder","last_synced_at":"2025-05-08T22:18:00.153Z","repository":{"id":43885083,"uuid":"345726768","full_name":"lambdalisue/rs-async-utf8-decoder","owner":"lambdalisue","description":"🦀 Utf8 decoder for AsyncRead in futures-rs","archived":false,"fork":false,"pushed_at":"2024-11-08T03:00:22.000Z","size":71,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-08T22:17:39.508Z","etag":null,"topics":["async","rust","utf8"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/async-utf8-decoder","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/lambdalisue.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},"funding":{"github":"lambdalisue"}},"created_at":"2021-03-08T16:47:54.000Z","updated_at":"2024-11-08T03:00:25.000Z","dependencies_parsed_at":"2024-10-24T04:35:45.128Z","dependency_job_id":null,"html_url":"https://github.com/lambdalisue/rs-async-utf8-decoder","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdalisue%2Frs-async-utf8-decoder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdalisue%2Frs-async-utf8-decoder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdalisue%2Frs-async-utf8-decoder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdalisue%2Frs-async-utf8-decoder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lambdalisue","download_url":"https://codeload.github.com/lambdalisue/rs-async-utf8-decoder/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253154983,"owners_count":21862624,"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":["async","rust","utf8"],"created_at":"2024-10-03T17:41:45.224Z","updated_at":"2025-05-08T22:18:00.128Z","avatar_url":"https://github.com/lambdalisue.png","language":"Rust","funding_links":["https://github.com/sponsors/lambdalisue"],"categories":[],"sub_categories":[],"readme":"[![crates.io](https://img.shields.io/crates/v/async-utf8-decoder.svg)](https://crates.io/crates/async-utf8-decoder)\n[![dependency status](https://deps.rs/repo/github/lambdalisue/rs-async-utf8-decoder/status.svg)](https://deps.rs/repo/github/lambdalisue/rs-async-utf8-decoder)\n[![docs.rs](https://docs.rs/async-utf8-decoder/badge.svg)](https://docs.rs/async-utf8-decoder)\n[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)\n[![Build](https://github.com/lambdalisue/rs-async-utf8-decoder/actions/workflows/build.yml/badge.svg)](https://github.com/lambdalisue/rs-async-utf8-decoder/actions/workflows/build.yml)\n[![Test](https://github.com/lambdalisue/rs-async-utf8-decoder/actions/workflows/test.yml/badge.svg)](https://github.com/lambdalisue/rs-async-utf8-decoder/actions/workflows/test.yml)\n[![Audit](https://github.com/lambdalisue/rs-async-utf8-decoder/actions/workflows/audit.yml/badge.svg)](https://github.com/lambdalisue/rs-async-utf8-decoder/actions/workflows/audit.yml)\n[![codecov](https://codecov.io/gh/lambdalisue/rs-async-utf8-decoder/branch/main/graph/badge.svg?token=ghor9fqplN)](https://codecov.io/gh/lambdalisue/rs-async-utf8-decoder)\n\n# async-utf8-decoder\n\n## Asynchronous and incremental UTF-8 decoder\n\n`async-utf8-decoder` crate provides `Utf8Decoder` which allows to convert any object which\nimplements `AsyncRead` trait into a string stream which implements `Stream` trait.\n\n### Example\n\n```rust\nuse futures::io;\nuse futures::channel::mpsc;\nuse async_utf8_decoder::Utf8Decoder;\n\nlet (mut tx, rx) = mpsc::unbounded::\u003cio::Result\u003cVec\u003cu8\u003e\u003e\u003e();\nlet mut decoder = Utf8Decoder::new(rx.into_async_read());\n\ntx.send(Ok(vec![240])).await?;\nassert!(timeout(decoder.next()).await.is_err());\ntx.send(Ok(vec![159])).await?;\nassert!(timeout(decoder.next()).await.is_err());\ntx.send(Ok(vec![146])).await?;\nassert!(timeout(decoder.next()).await.is_err());\ntx.send(Ok(vec![150])).await?;\nassert_eq!(\"💖\", timeout(decoder.next()).await?.unwrap()?);\nassert!(timeout(decoder.next()).await.is_err());\n```\n\n# License\n\nThe code follows MIT license written in [LICENSE](./LICENSE). Contributors need\nto agree that any modifications sent in this repository follow the license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flambdalisue%2Frs-async-utf8-decoder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flambdalisue%2Frs-async-utf8-decoder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flambdalisue%2Frs-async-utf8-decoder/lists"}