File tree 1 file changed +8
-5
lines changed 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -33,8 +33,13 @@ Originally based off of [deep-clone-derive](https://github.com/asajeffrey/deep-c
33
33
* normal [ structs] ( ./tests/struct.rs )
34
34
* enums with tuple variants [ tuple enums] ( ./tests/simple_enum.rs )
35
35
* ` IntoOwned ` alike fields (actually assumes all fields with types with lifetimes are ` IntoOwned ` alike)
36
- * [ options of Cow or Cow-like types] ( ./tests/opt_field.rs ) ` Option<Cow<'a, str>> ` and ` Option<Foo<'a>> `
37
- * [ vectors of Cow or Cow-like types] ( ./tests/vec.rs )
36
+ * ` Cow<'a, B> `
37
+ * [ ` Option<T> ` ] ( ./tests/opt_field.rs )
38
+ * [ ` Vec<T> ` ] ( ./tests/vec.rs )
39
+ * ` Box<T> `
40
+ * [ arrays] ( ./tests/array.rs )
41
+ * [ tuples] ( ./tests/tuple.rs )
42
+ * arbitrarily nested types built from the above ([ Example 1] ( ./tests/nested_types.rs ) , [ Example 2] ( ./tests/triple_cow.rs ) )
38
43
39
44
But wait there is even more! ` [derive(Borrowed)] ` generates a currently perhaps a bit limited version of a method like:
40
45
@@ -59,9 +64,7 @@ Note, there's no trait implementation expected because I didn't find one at the
59
64
Currently deriving will fail miserably for at least but not limited to:
60
65
61
66
* ` IntoOwned ` : borrowed fields like ` &'a str `
62
- * ` Borrowed ` : struct/enum has more than one lifetime
63
- * both: arrays not supported
64
- * both: into_owned/borrowed types inside tuples inside vectors
67
+ * ` Borrowed ` : struct/enum has multiple lifetimes that depend on each other (explicitly or implicitly)
65
68
66
69
Using with incompatible types results in not so understandable error messages. For example, given a struct:
67
70
You can’t perform that action at this time.
0 commit comments