Subtyping and variance can be tricky concepts. This post provides a concise overview of how Rust’s lifetime-based subtyping works, and how variance governs the propagation of subtyping through type constructors.
The typestate pattern is a powerful tool for enforcing the correctness of an object state and the
validity of its state transitions. It allows to control the initial state of an object, its
input and output types, shared data across states, and the methods available in each state.
All these invariants are enforced by the type system, at compile time.
In order to increase profitability, attestations must be aggregated in a way to cover as many individual
attestors as possible. Let’s explore the ways to do such an aggregation.