Skip to content

Commit

Permalink
Simplify the type binding a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
dfellis committed Aug 27, 2024
1 parent 096ceb7 commit 6bfe761
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -1098,11 +1098,11 @@ which reduces some redundant syntax, but also eliminates the wrapper function fr

### Binding Types

Similarly, binding types is done with the `Binds{T}` and `BindsGeneric{T, A, ...}` generic types.
Similarly, binding types is done with the `Binds{T, ...}` type.

```rs
type Foo = Binds{"Foo"};
type Bar{A, B} = BindsGeneric{"Bar", A, B}; // Becomes Bar<A, B> in Rust
type Bar{A, B} = Binds{"Bar", A, B}; // Becomes Bar<A, B> in Rust
```

Bound types are different from normal Alan types in that *zero* constructor and accessor functions are automatically defined for them. It is up to you `Call` Rust functions that create and work with this type.
Expand Down

0 comments on commit 6bfe761

Please sign in to comment.