Skip to content

Commit a9ee1ed

Browse files
committed
chore: update README.md
1 parent d775511 commit a9ee1ed

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,13 @@ Originally based off of [deep-clone-derive](https://github.com/asajeffrey/deep-c
3333
* normal [structs](./tests/struct.rs)
3434
* enums with tuple variants [tuple enums](./tests/simple_enum.rs)
3535
* `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))
3843

3944
But wait there is even more! `[derive(Borrowed)]` generates a currently perhaps a bit limited version of a method like:
4045

@@ -59,9 +64,7 @@ Note, there's no trait implementation expected because I didn't find one at the
5964
Currently deriving will fail miserably for at least but not limited to:
6065

6166
* `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)
6568

6669
Using with incompatible types results in not so understandable error messages. For example, given a struct:
6770

0 commit comments

Comments
 (0)