Struct immutable_arena::Ref [] [src]

pub struct Ref<'arena, T> { /* fields omitted */ }

A Ref<'arena, T> is a smart pointer type that may be used within an arena-allocated type to hold a reference to another object within that arena. It may be set exactly once, and is immutable thereafter. It dereferences only to a read-only borrow, never a mutable one.

Methods

impl<'arena, T> Ref<'arena, T> where
    T: 'arena, 
[src]

Create a new empty Ref. Dereferencing this reference before it is set will panic. The reference may be set exactly once.

Create a new Ref from an existing ordinary borrow with the appropriate lifetime. The resulting Ref may not be re-set to any other value.

Set the Ref. This may be done only once.

Trait Implementations

impl<'arena, T> Deref for Ref<'arena, T> where
    T: 'arena, 
[src]

The resulting type after dereferencing

The method called to dereference a value

impl<'arena, T> Clone for Ref<'arena, T> where
    T: 'arena, 
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'arena, T> Debug for Ref<'arena, T> where
    T: 'arena + Debug
[src]

Formats the value using the given formatter.