Bound

Trait Bound 

Source
pub unsafe trait Bound<'gc> {
    type Rebound;
}
Expand description

Trait which indicates a Gc’d object who’s lifetimes can be rebound.

§Safety

Implementor must ensure that the associated types only change the approriate lifetimes: Bound::Rebound only changes the ’gc.

§Example

use dreck::{Gc,Bound};
pub struct Container<'gc,'own>(Gc<'gc,'own, String>);

unsafe impl<'from,'own,'to> Bound<'to> for Container<'from,'own>{
    // Change the 'from lifetime into 'to
    type Rebound = Container<'to,'own>;
}

Required Associated Types§

Implementations on Foreign Types§

Source§

impl<'a, 'to, T, R> Bound<'to> for &'a mut T
where T: Bound<'to, Rebound = R>, R: 'a,

Source§

impl<'to> Bound<'to> for bool

Source§

impl<'to> Bound<'to> for char

Source§

impl<'to> Bound<'to> for f32

Source§

impl<'to> Bound<'to> for f64

Source§

impl<'to> Bound<'to> for i8

Source§

impl<'to> Bound<'to> for i16

Source§

impl<'to> Bound<'to> for i32

Source§

impl<'to> Bound<'to> for i64

Source§

impl<'to> Bound<'to> for isize

Source§

impl<'to> Bound<'to> for u8

Source§

impl<'to> Bound<'to> for u16

Source§

impl<'to> Bound<'to> for u32

Source§

impl<'to> Bound<'to> for u64

Source§

impl<'to> Bound<'to> for ()

Source§

impl<'to> Bound<'to> for usize

Source§

impl<'to> Bound<'to> for String

Source§

impl<'to, A: Bound<'to>> Bound<'to> for (A,)

Source§

type Rebound = (<A as Bound<'to>>::Rebound,)

Source§

impl<'to, A: Bound<'to>, B: Bound<'to>> Bound<'to> for (A, B)

Source§

type Rebound = (<A as Bound<'to>>::Rebound, <B as Bound<'to>>::Rebound)

Source§

impl<'to, A: Bound<'to>, B: Bound<'to>, C: Bound<'to>> Bound<'to> for (A, B, C)

Source§

type Rebound = (<A as Bound<'to>>::Rebound, <B as Bound<'to>>::Rebound, <C as Bound<'to>>::Rebound)

Source§

impl<'to, A: Bound<'to>, B: Bound<'to>, C: Bound<'to>, D: Bound<'to>> Bound<'to> for (A, B, C, D)

Source§

type Rebound = (<A as Bound<'to>>::Rebound, <B as Bound<'to>>::Rebound, <C as Bound<'to>>::Rebound, <D as Bound<'to>>::Rebound)

Source§

impl<'to, A: Bound<'to>, B: Bound<'to>, C: Bound<'to>, D: Bound<'to>, E: Bound<'to>> Bound<'to> for (A, B, C, D, E)

Source§

type Rebound = (<A as Bound<'to>>::Rebound, <B as Bound<'to>>::Rebound, <C as Bound<'to>>::Rebound, <D as Bound<'to>>::Rebound, <E as Bound<'to>>::Rebound)

Source§

impl<'to, A: Bound<'to>, B: Bound<'to>, C: Bound<'to>, D: Bound<'to>, E: Bound<'to>, F: Bound<'to>> Bound<'to> for (A, B, C, D, E, F)

Source§

type Rebound = (<A as Bound<'to>>::Rebound, <B as Bound<'to>>::Rebound, <C as Bound<'to>>::Rebound, <D as Bound<'to>>::Rebound, <E as Bound<'to>>::Rebound, <F as Bound<'to>>::Rebound)

Source§

impl<'to, A: Bound<'to>, B: Bound<'to>, C: Bound<'to>, D: Bound<'to>, E: Bound<'to>, F: Bound<'to>, G: Bound<'to>> Bound<'to> for (A, B, C, D, E, F, G)

Source§

type Rebound = (<A as Bound<'to>>::Rebound, <B as Bound<'to>>::Rebound, <C as Bound<'to>>::Rebound, <D as Bound<'to>>::Rebound, <E as Bound<'to>>::Rebound, <F as Bound<'to>>::Rebound, <G as Bound<'to>>::Rebound)

Source§

impl<'to, A: Bound<'to>, B: Bound<'to>, C: Bound<'to>, D: Bound<'to>, E: Bound<'to>, F: Bound<'to>, G: Bound<'to>, H: Bound<'to>> Bound<'to> for (A, B, C, D, E, F, G, H)

Source§

type Rebound = (<A as Bound<'to>>::Rebound, <B as Bound<'to>>::Rebound, <C as Bound<'to>>::Rebound, <D as Bound<'to>>::Rebound, <E as Bound<'to>>::Rebound, <F as Bound<'to>>::Rebound, <G as Bound<'to>>::Rebound, <H as Bound<'to>>::Rebound)

Source§

impl<'to, T: Bound<'to>> Bound<'to> for Option<T>

Source§

type Rebound = Option<<T as Bound<'to>>::Rebound>

Source§

impl<'to, T: Bound<'to>> Bound<'to> for Vec<T>

Source§

type Rebound = Vec<<T as Bound<'to>>::Rebound>

Implementors§

Source§

impl<'to, 'from, 'own, T> Bound<'to> for Gc<'from, 'own, T>
where T: Trace<'own> + Bound<'to>, T::Rebound: Trace<'own> + 'to,

Source§

type Rebound = Gc<'to, 'own, <T as Bound<'to>>::Rebound>