Rust - Idiomatic Rust API design

less than 1 minute read

Rust is great programming language because of default move semantic and trait system. Idiomatic Rust API is fully utilizing these concept to make it easy to use and looks elegant with zero overhead cost at runtime.

So it’s crucial to understanding existing standard trait for Rust API design such as From, Iterator, FromStr etc and how trait allow us to extend the existing type.

The following links are useful resources to design idiomatic Rust API.
https://rust-lang.github.io/api-guidelines/
https://deterministic.space/elegant-apis-in-rust.html

Categories:

Updated: