pub trait FromDevice<Src>: Sized {
type Profile;
// Required method
fn from_device(src: Src, profile: &Self::Profile) -> Self;
}Expand description
Convert from a device-dependent color, given a profile.
Analogous to From, but parameterized by a profile type Self::Profile
that provides the colorimetric description of the source device space.
Use () as the profile type for naive, profile-free conversions.
Required Associated Types§
Required Methods§
Sourcefn from_device(src: Src, profile: &Self::Profile) -> Self
fn from_device(src: Src, profile: &Self::Profile) -> Self
Convert src to Self using profile.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.