Skip to content

Add a decoder-like type for splitting incrementally-received text #10

@jwodder

Description

@jwodder

Prerequisite: #9

  • The type should work like a tokio_util::codec::Decoder type where Item is String and Error is std::string::FromUtf8Error.

  • A decoder is constructed from a NewlinePattern value and searches a given buffer of bytes for a match; if it finds one, it attempts to decode all bytes up to/through the match using String::from_utf8(), returning the error if it fails.

  • Add options for whether to retain trailing matches and/or yield a final empty string after a final match

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockedCannot be implemented until something else happensenhancementNew feature or request therefor

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions