Skip to content

Commit 20ea7ea

Browse files
authored
Merge pull request #63 from fitzgen/api-skeleton
Add a bit about the API's skeleton to the API proposal template
2 parents e9a3fa3 + d71b861 commit 20ea7ea

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

.github/ISSUE_TEMPLATE/propose_design.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,24 @@ Why are we doing this? What problems does it solve?
1919
Introduce and explain the new APIs and concepts. How will this proposal be
2020
implemented? Provide representative and edge-case examples.
2121

22+
Provide a skeleton of the proposed API by writing out types (don't need their
23+
members or full implementation) as well as function and method signatures
24+
(again, just the signature, don't need the function body):
25+
26+
```rust
27+
pub struct Whatever { ... }
28+
29+
impl Whatever {
30+
pub fn new(raw: &web_sys::RawWhatever) -> Self { ... }
31+
pub fn another(&self) -> Another { ... }
32+
}
33+
34+
pub struct Another { ... }
35+
36+
// Does X, Y, and Z when dropped.
37+
impl Drop for Another {}
38+
```
39+
2240
## Drawbacks, Rationale, and Alternatives
2341

2442
Does this design have drawbacks? Are there alternative approaches? Why is this

0 commit comments

Comments
 (0)