Sized and ?Sized

The Sized trait is a marker trait that represents types whose sizes are known at compile time. It is implemented for most types in Rust except for unsized types. All type parameters have an implicit trait bound of Sized in their definition. We can also specify optional trait bounds using the ? operator before a trait, but the ? operator with traits only works for marker traits as the time of writing this book. It may be extended to other types in future.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset