Trait RamaInto

pub trait RamaInto<T, CrateMarker = ()>: Sized {
    // Required method
    fn rama_into(self) -> T;
}
Expand description

Alternative for Into which can be implemented by external crates for external types

To implement this trait, use a crate local CrateMarker generic type More info: https://ramaproxy.org/book/intro/patterns.html#working-around-the-orphan-rule-in-specific-cases

Note: RamaInto has a blacket implementation for types that implement RamaFrom in the opposite direction, and as such also work for types that implement Into

Required Methods§

fn rama_into(self) -> T

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.

Implementors§

§

impl<T, U, CrateMarker> RamaInto<U, CrateMarker> for T
where U: RamaFrom<T, CrateMarker>,