You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given a &[T], Rust supports creating a new &[T] referring to a subset of the original referent, and also supports splitting into two non-overlapping &[T]s that, together, cover the original referent. To my knowledge, this is not supported for slice DSTs.
We could add APIs for these slicing operations to KnownLayout<PointerMetadata = usize>.
One use case for this design would be to support packet formats with explicit length fields - it would be a possibly lighter-weight way of supporting #1289 without requiring solving the general problem described in that issue.
The text was updated successfully, but these errors were encountered:
Given a
&[T]
, Rust supports creating a new&[T]
referring to a subset of the original referent, and also supports splitting into two non-overlapping&[T]
s that, together, cover the original referent. To my knowledge, this is not supported for slice DSTs.We could add APIs for these slicing operations to
KnownLayout<PointerMetadata = usize>
.One use case for this design would be to support packet formats with explicit length fields - it would be a possibly lighter-weight way of supporting #1289 without requiring solving the general problem described in that issue.
The text was updated successfully, but these errors were encountered: