pub trait Length { // Required method fn length(&self) -> usize; }
Values that have a length (see Len and NonEmpty).
Len
NonEmpty
The length of strings is the number of characters, of collections the number of items.
Returns the length.
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".