Struct servo_arc::RawOffsetArc
[−]
[src]
#[repr(C)]pub struct RawOffsetArc<T: 'static> { /* fields omitted */ }
An Arc, except it holds a pointer to the T instead of to the entire ArcInner.
Arc<T> RawOffsetArc<T>
| |
v v
---------------------
| RefCount | T (data) | [ArcInner<T>]
---------------------
This means that this is a direct pointer to
its contained data (and can be read from by both C++ and Rust),
but we can also convert it to a "regular" Arc
Methods
impl<T: 'static> RawOffsetArc<T>
[src]
fn with_arc<F, U>(&self, f: F) -> U where
F: FnOnce(&Arc<T>) -> U,
[src]
F: FnOnce(&Arc<T>) -> U,
Temporarily converts |self| into a bonafide Arc and exposes it to the provided callback. The refcount is not modified.
fn make_mut(&mut self) -> &mut T where
T: Clone,
[src]
T: Clone,
If uniquely owned, provide a mutable reference Else create a copy, and mutate that
fn clone_arc(&self) -> Arc<T>
[src]
Clone it as an Arc
fn borrow_arc<'a>(&'a self) -> ArcBorrow<'a, T>
[src]
Produce a pointer to the data that can be converted back to an arc
Trait Implementations
impl<T: Eq + 'static> Eq for RawOffsetArc<T>
[src]
impl<T: 'static + Sync + Send> Send for RawOffsetArc<T>
[src]
impl<T: 'static + Sync + Send> Sync for RawOffsetArc<T>
[src]
impl<T: 'static> Deref for RawOffsetArc<T>
[src]
type Target = T
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
Dereferences the value.
impl<T: 'static> Clone for RawOffsetArc<T>
[src]
fn clone(&self) -> Self
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<T: 'static> Drop for RawOffsetArc<T>
[src]
impl<T: Debug + 'static> Debug for RawOffsetArc<T>
[src]
impl<T: PartialEq> PartialEq for RawOffsetArc<T>
[src]
fn eq(&self, other: &RawOffsetArc<T>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &RawOffsetArc<T>) -> bool
[src]
This method tests for !=
.