Struct obstack::Ref [] [src]

pub struct Ref<'a, T: 'a + ?Sized> { /* fields omitted */ }

A wrapper referencing a value in an Obstack.

A Ref value is owns the value it references, and will invoke drop on the value when the Ref goes out of scope. Effectively a Ref is a Box that uses an Obstack rather than the heap.

Trait Implementations

impl<'a, T> Deref for Ref<'a, T>
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.

impl<'a, T> DerefMut for Ref<'a, T>
[src]

[src]

Mutably dereferences the value.

impl<'a, T> Pointer for Ref<'a, T>
[src]

[src]

Formats the value using the given formatter.

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

[src]

Formats the value using the given formatter.

impl<'a, T> Display for Ref<'a, T> where
    T: Display
[src]

[src]

Formats the value using the given formatter. Read more

impl<'a, T> PartialEq for Ref<'a, T> where
    T: PartialEq<T>, 
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl<'a, T> Eq for Ref<'a, T> where
    T: Eq
[src]

impl<'a, T> Ord for Ref<'a, T> where
    T: Ord
[src]

[src]

This method returns an Ordering between self and other. Read more

[src]

🔬 This is a nightly-only experimental API. (ord_max_min)

Compares and returns the maximum of two values. Read more

[src]

🔬 This is a nightly-only experimental API. (ord_max_min)

Compares and returns the minimum of two values. Read more

impl<'a, T> PartialOrd for Ref<'a, T> where
    T: PartialOrd
[src]

[src]

This method returns an ordering between self and other values if one exists. Read more

[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

[src]

This method tests less than (for self and other) and is used by the < operator. Read more

[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<'a, T> AsMut<T> for Ref<'a, T>
[src]

[src]

Performs the conversion.

impl<'a, T> AsRef<T> for Ref<'a, T>
[src]

[src]

Performs the conversion.

impl<'a, T> Borrow<T> for Ref<'a, T>
[src]

[src]

Immutably borrows from an owned value. Read more

impl<'a, T> BorrowMut<T> for Ref<'a, T>
[src]

[src]

Mutably borrows from an owned value. Read more

impl<'a, T: ?Sized> Drop for Ref<'a, T>
[src]

[src]

Executes the destructor for this type. Read more