In the fast-paced world of Web3 development, flexibility is the name of the game. Imagine you’re building the next groundbreaking decentralized finance (DeFi) app, and the standard token transfer rules just don’t cut it. You need something more dynam...
Before diving deeper, let's understand the key differences between static and dynamic dispatching. When you have a trait (interface for those unfamiliar with rust), you have to put the function signature of what all classes or struct will implement. ...
This blog is a summay of Chapter 2.8 of Rust Course (course.rs) Generics Generics can be used in structs, enumerators, and methods, as shown in the example below: 1 Using generics in structs: struct Point<T> { x: T, y: T } fn main() { le...