/// @module std::core::into
/// Infallible conversion trait used by `as Type`.
///
/// Dispatch uses named impl selectors (`as <TypeName>`) so conversions are
/// statically validated and resolved without primitive conversion tables.
/// Define an infallible conversion from `Self` into `Target`.
///
/// @see std::core::from::From
/// @see std::core::try_into::TryInto
trait Into<Target> {
/// Convert `self` into `Target` without failure.
into(): Target
}
impl Into<number> for int as number {
method into() { self as number }
}
impl Into<decimal> for int as decimal {
method into() { self as decimal }
}
impl Into<string> for int as string {
method into() { self as string }
}
impl Into<bool> for int as bool {
method into() { self as bool }
}
impl Into<string> for number as string {
method into() { self as string }
}
impl Into<bool> for number as bool {
method into() { self as bool }
}
impl Into<string> for decimal as string {
method into() { self as string }
}
impl Into<int> for bool as int {
method into() { self as int }
}
impl Into<number> for bool as number {
method into() { self as number }
}
impl Into<decimal> for bool as decimal {
method into() { self as decimal }
}
impl Into<string> for bool as string {
method into() { self as string }
}