Module for wrapping freezable data structures in managed boxes. Normally freezable data structures require an unaliased reference, such as T or ~T, so that the compiler can track when they are being mutated. The managed<T> type converts these static checks into dynamic checks: your program will fail if you attempt to perform mutation when the data structure should be immutable.

Type Mut

type Mut<T> = Data<T>

Enum Mode

Variants

Struct Data

struct Data <T>{
    priv mut value: T,
    priv mut mode: Mode,
}

Implementation for Data<T>

Method borrow_mut

fn borrow_mut<R>(op: &fn(t: &mut T) -> R) -> R

Method borrow_const

fn borrow_const<R>(op: &fn(t: &const T) -> R) -> R

Method borrow_imm

fn borrow_imm<R>(op: &fn(t: &T) -> R) -> R

Method unwrap

fn unwrap() -> T

Function Mut

fn Mut<T>(t: T) -> Mut<T>

Function unwrap

fn unwrap<T>(m: Mut<T>) -> T