From 1f32405fcddda8a9b0bf94e9185558fab1780ed4 Mon Sep 17 00:00:00 2001 From: numzero Date: Wed, 23 Sep 2026 22:08:51 +0300 Subject: [PATCH] add README --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..38fc02a --- /dev/null +++ b/README.md @@ -0,0 +1,9 @@ +# Inline `dyn` + +A relatively simple example wrapper working (kinda) as a *by-value* `dyn Trait`. + +Limitations: +* The wrapper size is fixed. The content either fits, or it doesn’t compile. +* Supporting each trait requires a bit of code, as there is no way to express “for each *trait* X” in Rust. +* Requires unstable features (notably `ptr_metadata`, others are probably avoidable). +* `unsafe` here, `unsafe` there, `unsafe` everywhere! (It does pass Miri though).