Struct servo_arc::ArcBorrow [] [src]

pub struct ArcBorrow<'a, T: 'a>(_);

A "borrowed Arc". This is a pointer to a T that is known to have been allocated within an Arc.

This is equivalent in guarantees to &Arc<T>, however it is a bit more flexible. To obtain an &Arc<T> you must have an Arc instance somewhere pinned down until we're done with it.

However, Gecko hands us refcounted things as pointers to T directly, so we have to conjure up a temporary Arc on the stack each time. The same happens for when the object is managed by a RawOffsetArc.

ArcBorrow lets us deal with borrows of known-refcounted objects without needing to worry about how they're actually stored.

Methods

impl<'a, T> ArcBorrow<'a, T>
[src]

[src]

[src]

For constructing from a reference known to be Arc-backed, e.g. if we obtain such a reference over FFI

[src]

Trait Implementations

impl<'a, T: Eq + 'a> Eq for ArcBorrow<'a, T>
[src]

impl<'a, T: PartialEq + 'a> PartialEq for ArcBorrow<'a, 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> Copy for ArcBorrow<'a, T>
[src]

impl<'a, T> Clone for ArcBorrow<'a, T>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

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

The resulting type after dereferencing.

[src]

Dereferences the value.