This takes a `Supercow`, so it can accept owned, borrowed, or shared // values with the same API. Parameter and one type parameter, corresponding to the lifetime and type ofĪn immutable reference, i.e., Supercow ⇒ &'a Type. In many cases, you can think of a Supercow as having only one lifetime Perform efficient copy-on-write and data sharing Īvoid cloning until absolutely necessary, even if the point at which itīecomes necessary is determined dynamically. Write APIs that allow client code to manage its resources however it Return values with ownership semantics decided at run-time The containee to be Clone or ToOwned unless operations inherently Though nominally similar toĬow in structure (and being named after it), Supercow does not require Involving heavy-weight references (e.g, Arc). ![]() General references while maintaining very low overhead for usages not Supercow provides a mechanism for making APIs that accept or return very
0 Comments
Leave a Reply. |