Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support vectors in to_string #3

Open
Jomy10 opened this issue Jan 12, 2022 · 0 comments
Open

Support vectors in to_string #3

Jomy10 opened this issue Jan 12, 2022 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@Jomy10
Copy link
Owner

Jomy10 commented Jan 12, 2022

Currently, a vector would have to be wrapped in another struct that implements the ToString trait.
Ideally, we want to be able to do this:

#[table_row]
struct Row {
    id: u32,
    privileges: Vec<String>
}

And when calling the to_string method, this would output:

+----+------------+
| id | privileges |
+====+============+
| 1  | admin      |
|    | user       |
+----+------------+
| 2  | user       |
+----+------------+
@Jomy10 Jomy10 added enhancement New feature or request help wanted Extra attention is needed labels Jan 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant