Trait escher::RebindTo [−][src]
The RebindTo
trait defines a type level function that allows you convert a type that holds
references of lifetime 'a
to a type that holds references of lifetime 'b
.
The trait is unsafe because the implementer needs to make sure that the associated type differs with the implementing type only on their lifetimes. In other words, it’s meant to prevent incantations like:
ⓘ
unsafe impl<'a> RebindTo<'a> for Foo<'_> { type Out = Bar<'a>; // !!WRONG!! } unsafe impl<'a> RebindTo<'a> for Foo<'_> { type Out = Foo<'a>; // CORRECT }
Users should avoid implementing this trait manually and derive Rebindable instead.
Associated Types
Loading content...Implementations on Foreign Types
impl<'a, T: ?Sized + 'static> RebindTo<'a> for &T
[src]
Blanket implementation for any reference to owned data
impl<'a, T: ?Sized + 'static> RebindTo<'a> for &mut T
[src]
Blanket implementation for any mutable reference to owned data