[−][src]Struct rusty_v8::SharedRef
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]
T: Shared,
Methods from Deref<Target = UnsafeCell<T>>
pub const fn get(&self) -> *mut T
1.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]
T: Shared,
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T> Deref for SharedRef<T> where
T: Shared,
[src]
T: Shared,
type Target = UnsafeCell<T>
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
impl<T> DerefMut for SharedRef<T> where
T: Shared,
[src]
T: Shared,
impl<T> Drop for SharedRef<T> where
T: Shared,
[src]
T: Shared,
impl<T> From<UniqueRef<T>> for SharedRef<T> where
T: Delete + Shared,
[src]
T: Delete + Shared,
impl<T> Send for SharedRef<T> where
T: Shared + Send,
[src]
T: Shared + Send,
Auto Trait Implementations
impl<T> RefUnwindSafe for SharedRef<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> !Sync for SharedRef<T>
impl<T> Unpin for SharedRef<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for SharedRef<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,