from_lua_value is used to attempt to deserialize a generic lua value into a concrete Rust type that is known at compile time. This uses some support logic inside mlua to allow: * If it is a userdata created by mlua, mlua will try to retrieve that concrete rust type if the type of the userdata exactly matches. * otherwise: it will use serde to deserialize the lua value into the rust type. mlua's deserializer cannot process userdata, so if we still have on at this point, the attempt to convert it will fail. That's mostly fine, but our memoize crate will start returning a proxy userdata type in a future commit, and since that proxy type will never match the concrete Rust type that is desired by the above logic, it will become impossible to pass memoized values without some kind of explicit preprocessing. What this commit does is add implicit preprocessing of the value: if we cannot use the default mlua userdata cast, then, if the value is a userdata, we will iterate over its fields to build a native lua representation of that value. We also apply this translation by traversing tables and converting their values, recursively. While this is "preprocessing", it is only applied in case the regular from_lua_value logic in mlua (the fast path) fails, so this is fallback preprocessing rather than eager preprocessing, which should be performance neutral in the common hot code paths.
KumoMTA
KumoMTA is an open-source Message Transfer Agent (MTA) designed for high-performance outbound email functionality, similar to commercial enterprise MTAs such as Momentum, PowerMTA, and Halon.
The KumoMTA project was founded by a group of email industry veterans with decades of experience building and managing high-performance On-Prem MTAs and is supported by a community of some of the largest senders in the world.
Because it is designed for high-performance sending environments, KumoMTA is for experienced email operations professionals who are accustomed to high-performance sending environments and familiar with DevOps practices.
Learn more in our FAQ and at https://kumomta.com/.
Documentation
You can learn more about KumoMTA from the Documentation.
Community
Real-time discussion is available on Our Discord.
Developers
If you are interested in contributing/extending KumoMTA, take a look at DEVELOPERS.md. The #devel channel on Our Discord is for contributors to discuss KumoMTA development.
Reporting Bugs
See How to Report Bugs.
Getting Help
See How to Get Help. For paid support see https://kumomta.com/support.
Getting Updates
You can subscribe to updates at https://kumomta.com/subscribe, we send updates periodically and will never sell nor share your information.
Talk to Us
We're available to talk about the project, book us at https://cal.com/team/kumomta/talk-with-kumomta.