DOC: Add safety documentation on Array trait

This commit is contained in:
bluss
2019-09-25 14:42:35 +02:00
parent ba4d98c5c7
commit babae41d21
+9
View File
@@ -12,6 +12,15 @@
/// (a few in this range are included by default).
/// - `array-sizes-129-255`: All sizes 129 to 255 are implemented
/// (a few in this range are included by default).
///
/// ## Safety
///
/// If implemented, this trait can only be implmented by fixed-size arrays or
/// types with exactly the representation of a fixed size array (of the right
/// element type and capacity).
///
/// Normally this trait is an implementation detail of arrayvec and doesn't
/// need implementing.
pub unsafe trait Array {
/// The arrays element type
type Item;