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

[Examples] Add examples of how to map over generic and labelled representations #192

Merged
merged 2 commits into from
Jul 17, 2021

Conversation

lloydmeta
Copy link
Owner

❯ cargo run --example generic
    Finished dev [unoptimized + debuginfo] target(s) in 0.02s
     Running `target/debug/examples/generic`
Joe
First name: bo
Last name: peep
age: 30
❯ cargo run --example labelled
    Finished dev [unoptimized + debuginfo] target(s) in 0.02s
     Running `target/debug/examples/labelled`
Blow
ExternalPerson {
    age: 10,
    address: ExternalAddress {
        name: "somewhere out there",
        phone: ExternalPhoneNumber {
            main: 1234,
        },
    },
    name: "John",
}
first_name: bo
last_name: peep
age: 30

…sentations

```
❯ cargo run --example generic
    Finished dev [unoptimized + debuginfo] target(s) in 0.02s
     Running `target/debug/examples/generic`
Joe
First name: bo
Last name: peep
age: 30
❯ cargo run --example labelled
    Finished dev [unoptimized + debuginfo] target(s) in 0.02s
     Running `target/debug/examples/labelled`
Blow
ExternalPerson {
    age: 10,
    address: ExternalAddress {
        name: "somewhere out there",
        phone: ExternalPhoneNumber {
            main: 1234,
        },
    },
    name: "John",
}
first_name: bo
last_name: peep
age: 30
```
@lloydmeta lloydmeta merged commit 8d82a7b into master Jul 17, 2021
@lloydmeta lloydmeta deleted the examples/show-how-to-map-over-struct-reprs branch July 17, 2021 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant