pub trait DTypePromoteAPI<T> {
type Res;
const SAME_TYPE: bool = false;
const CAN_CAST_SELF: bool = false;
const CAN_CAST_OTHER: bool = false;
// Required methods
fn promote_self(self) -> Self::Res;
fn promote_other(val: T) -> Self::Res;
// Provided method
fn promote_pair(self, val: T) -> (Self::Res, Self::Res)
where Self: Sized { ... }
}Provided Associated Constants§
const SAME_TYPE: bool = false
const CAN_CAST_SELF: bool = false
const CAN_CAST_OTHER: bool = false
Required Associated Types§
Required Methods§
fn promote_self(self) -> Self::Res
fn promote_other(val: T) -> Self::Res
Provided Methods§
fn promote_pair(self, val: T) -> (Self::Res, Self::Res)where
Self: Sized,
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.