//! blanket implementation in the standard library. When targeting a version prior to Rust 1.41, it
/// - Unlike `AsRef`, [`Borrow`] has a blanket impl for any `T`, and can be used to accept either
/// `Box::new(foo).as_ref()`. Instead, many smart pointers provide an `as_ref` implementation which
/// Ideally, `AsRef` would be reflexive, i.e. there would be an `impl<T: ?Sized> AsRef<T> for T`
/// Rust's type system (it would be overlapping with another existing blanket implementation for
/// `&T where T: AsRef<U>` which allows `AsRef` to auto-dereference, see "Generic Implementations"
/// A trivial implementation of `AsRef<T> for T` must be added explicitly for a particular type `T`
/// Since both [`String`] and [`&str`] implement `AsRef<str>` we can accept both as input argument.
/// `Box::new(foo).as_mut()`. Instead, many smart pointers provide an `as_mut` implementation which
/// used for the sole purpose of mutable dereferencing; instead ['`Deref` coercion'] can be used:
/// Types which implement [`DerefMut`] should consider to add an implementation of `AsMut<T>` as
/// Ideally, `AsMut` would be reflexive, i.e. there would be an `impl<T: ?Sized> AsMut<T> for T`
/// Rust's type system (it would be overlapping with another existing blanket implementation for
/// A trivial implementation of `AsMut<T> for T` must be added explicitly for a particular type `T`
/// Using `AsMut` as trait bound for a generic function, we can accept all mutable references that
/// there can be multiple implementations of `AsMut` for a type. In particular, `Vec<T>` implements
/// interface which work with any type that can be converted by cheap mutable-to-mutable conversion
/// `&mut Vec<u8>`, for example, is the better choice (callers need to pass the correct type then).
/// Used to do value-to-value conversions while consuming the input value. It is the reciprocal of
/// Only implement [`Into`] when targeting a version prior to Rust 1.41 and converting to a type
/// The `From` trait is also very useful when performing error handling. When constructing a function
/// that encapsulates multiple error types. See the "Examples" section and [the book][book] for more
/// While performing error handling it is often useful to implement `From` for your own error type.
/// Prefer using [`TryInto`] over [`TryFrom`] when specifying trait bounds on a generic function
/// Prefer using [`TryInto`] over [`TryFrom`] when specifying trait bounds on a generic function
/// before `!` is stabilized as a full-fledged type: in the position of a function’s return type.
/// Specifically, it is possible to have implementations for two different function pointer types: