Trait SrcTarget
Source pub trait SrcTarget: SealedSrcTarget {
type Item: Sized;
}
Expand description
A sealed trait to encode types that can can be used in the Src-family of pointers.
Either Self: Sized or Self: SrcSlice.
The type of each element of a Src<Self>.
- Where
Self: Sized: Self::Item = Self
- Where
Self = [T]: Self::Item = T
- Where
Self = str: Self::Item = u8
(because a str is just a [u8] which must be UTF-8)
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.