google/zerocopy

Document slice DSTs and size validity at the crate root

joshlf opened this issue · 0 comments

Add a section to our crate root docs roughly with the following shape:

//! # Dynamically-sized types
//! 
//! Zerocopy supports slice-based dynamically sized types ("slice DSTs", or just
//! "DSTs" for short) via the [`KnownLayout`] trait.
//! 
//! A slice DST is a type...
//! 
//! ## What is a valid size?
//! 
//! ...

The section should give an overview of slice DSTs at a level of detail appropriate for our users. The "What is a valid size?" sub-section should describe the concept of "has a valid size for T", which is used in places in our API where we support slice DSTs. Those places should link to this sub-section.