Skip to content

Commit 70a20df

Browse files
committed
Document rust::Slice's new constructor in book
1 parent a9f860c commit 70a20df

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

book/src/binding/slice.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ public:
2323
Slice(const Slice<T> &) noexcept;
2424
Slice(T *, size_t count) noexcept;
2525
26+
template <typename C>
27+
explicit Slice(C& c) : Slice(c.data(), c.size());
28+
2629
Slice &operator=(Slice<T> &&) noexcept;
2730
Slice &operator=(const Slice<T> &) noexcept
2831
requires std::is_const_v<T>;

0 commit comments

Comments
 (0)