This post explains how to create an agnostic trait-based storage in Rust. It covers topics such as async, new-type idiom, dynamic dispatching, and sqlx.
Table of contents
Working with data storages in RustHints for real production:Few words about the authorLet’s do some RustDefining basic typesTimestamp typeEvent typeEvent bufferStorage traitDatabaseImplementing Storage traitImplementing extra required traitsTestingSummarySome extra stuff — ND-JSON storageThat’s all, folksSort: