[][src]Struct rusty_v8::SharedRef

#[repr(C)]
pub struct SharedRef<T>(_, _)
where
    T: Shared
;

Wrapper around a C++ shared_ptr. The shared_ptr is assumed to contain a value and not be null.

Methods

impl<T> SharedRef<T> where
    T: Shared, 
[src]

pub fn use_count(&self) -> long[src]

Methods from Deref<Target = UnsafeCell<T>>

pub const fn get(&self) -> *mut T1.0.0[src]

Gets a mutable pointer to the wrapped value.

This can be cast to a pointer of any kind. Ensure that the access is unique (no active references, mutable or not) when casting to &mut T, and ensure that there are no mutations or mutable aliases going on when casting to &T

Examples

use std::cell::UnsafeCell;

let uc = UnsafeCell::new(5);

let five = uc.get();

Trait Implementations

impl<T> Clone for SharedRef<T> where
    T: Shared, 
[src]

impl<T> Deref for SharedRef<T> where
    T: Shared, 
[src]

type Target = UnsafeCell<T>

The resulting type after dereferencing.

impl<T> DerefMut for SharedRef<T> where
    T: Shared, 
[src]

impl<T> Drop for SharedRef<T> where
    T: Shared, 
[src]

impl<T> From<UniqueRef<T>> for SharedRef<T> where
    T: Delete + Shared, 
[src]

impl<T> Send for SharedRef<T> where
    T: Shared + Send
[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for SharedRef<T> where
    T: RefUnwindSafe

impl<T> !Sync for SharedRef<T>

impl<T> Unpin for SharedRef<T> where
    T: Unpin

impl<T> UnwindSafe for SharedRef<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.