Struct rusty_v8::SharedRef [−][src]
Wrapper around a C++ shared_ptr. The shared_ptr is assumed to contain a value and may not be null.
Implementations
impl<T: Shared> SharedRef<T>
[src]
pub fn assert_use_count_eq(&self, expected: usize)
[src]
Asserts that the number of references to the shared inner value is equal
to the expected
count.
This function relies on the C++ method std::shared_ptr::use_count()
,
which usually performs a relaxed load. This function will repeatedly call
use_count()
until it returns the expected value, for up to one second.
Therefore it should probably not be used in performance critical code.
Trait Implementations
impl<T: Shared> AsRef<T> for SharedRef<T>
[src]
impl<T: Shared> Borrow<T> for SharedRef<T>
[src]
impl<T: Shared> Clone for SharedRef<T>
[src]
fn clone(&self) -> Self
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T: Debug + Shared> Debug for SharedRef<T>
[src]
impl<T: Shared> Deref for SharedRef<T>
[src]
impl<T: Shared> From<SharedRef<T>> for SharedPtr<T>
[src]
impl<T: Shared> From<UniqueRef<T>> for SharedRef<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for SharedRef<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for SharedRef<T> where
T: Sync,
T: Sync,
impl<T> Sync for SharedRef<T> where
T: Sync,
T: Sync,
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,
pub 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.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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>,