mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 01:07:15 +03:00
7ae097e8da
Summary: A common pattern in Mercurial's data storage layer Python bindings is to have a Python object that wraps a Rust object. These Python objects are often passed across the FFI boundary to Rust code, which then may need to access the underlying Rust value. Previously, the objects that used this pattern did so in an ad-hoc manner, typically by providing an `into_inner` or `to_inner` inherent method. This diff introduces a new `ExtractInner` trait that standardizes this pattern into a single interface, which in turn allows this pattern to be used with generics. Reviewed By: quark-zju Differential Revision: D22429347 fbshipit-source-id: cab4c24b8b98c6ef8307f72a9b4726aabdc829cc |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |