Skip to content

Feature: convert back a Token<'_> into a Cow<'_, str> #115

@marmeladema

Description

@marmeladema

Hello and thank you for your crate 👍

I am working on a project in which I have a collection of Cow<'_, str> but I would like to encode some of them. To do this, I need to call Token::new(token) but once I have a Token there is no way for me to retrieve back the Cow to store in the collection.

Another alternative would to provide a standalone fn decode_token(Cow<'_, str>) -> Cow<'_, str> function without going through aToken at all if that's preferable.

I am willing to work on this, I just want to know how you feel about it before I start the implementation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions