Skip to content
This repository has been archived by the owner on Jun 7, 2023. It is now read-only.

Commit

Permalink
Added Deref details
Browse files Browse the repository at this point in the history
  • Loading branch information
zesterer committed Oct 30, 2019
1 parent 519f253 commit e78f90f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions text/0000-tangle/0000-tangle.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ let tx0_trunk_trunk = tangle

As can be seen, walking the Tangle is unnecessarily explicit.

To address this issue we suggest a design that makes use of Rust's zero-cost approach to abstraction to transparently manipulate the Tangle using guard/reference types and the `Deref` trait.
To address this issue we suggest a design that makes use of Rust's zero-cost approach to abstraction to transparently manipulate the Tangle using guard/reference types and the `Deref` trait. The `Deref` trait permits a type to dereference to another, thereby allowing one to call the methods of the inner type on the wrapper type.

The equivalent code using the proposed API abstraction:

Expand Down Expand Up @@ -406,4 +406,4 @@ mod tests {

# Unresolved questions

- How does the design of this Tangle API relate to the implementation of the storage database layer? Should we move to an async query model?
- How does the design of this Tangle API relate to the implementation of the storage database layer? Should we move to an async query model?

0 comments on commit e78f90f

Please sign in to comment.