pub fn as_ptr(this: &Self) -> *const T {
        let ptr: *mut StrongArcInner<T> = NonNull::as_ptr(this.ptr);

        // SAFETY: This cannot go through Deref::deref or RcBoxPtr::inner because
        // this is required to retain raw/mut provenance such that e.g. `get_mut` can
        // write through the pointer after the Rc is recovered through `from_raw`.
        unsafe { ptr::addr_of_mut!((*ptr).data) }
    }
/// Provides a raw pointer to the data.
///
/// The counts are not affected in any way and the `StrongArc` is not consumed. The pointer is
/// valid for as long as there are strong counts in the `StrongArc`.
///
/// # Examples
///
/// ```
/// use std::sync::Arc;
///
/// let x = StrongArc::new("hello".to_owned());
/// let y = StrongArc::clone(&x);
/// let x_ptr = StrongArc::as_ptr(&x);
/// assert_eq!(x_ptr, StrongArc::as_ptr(&y));
/// assert_eq!(unsafe { &*x_ptr }, "hello");
/// ```
Provides a raw pointer to the data.
The counts are not affected in any way and the `StrongArc` is not consumed. The pointer is
valid for as long as there are strong counts in the `StrongArc`.
Provides a raw pointer to the data . The counts are not affected in any way and the ` StrongArc ` is not consumed . The pointer is valid for as long as there are strong counts in the ` StrongArc ` .
pub fn as_ptr(this: &Self) -> *const T {
        let ptr: *mut StrongArcInner<T> = NonNull::as_ptr(this.ptr);
        // SAFETY: This cannot go through Deref::deref or RcBoxPtr::inner because
        // this is required to retain raw/mut provenance such that e.g. `get_mut` can
        // write through the pointer after the Rc is recovered through `from_raw`.
        unsafe { ptr::addr_of_mut!((*ptr).data) }
    }
pub fn as_ptr ( this : & Self ) -> * const T { let ptr : * mut StrongArcInner < T > = NonNull :: as_ptr ( this . ptr ) ; // SAFETY: This cannot go through Deref::deref or RcBoxPtr::inner because // this is required to retain raw/mut provenance such that e.g. `get_mut` can // write through the pointer after the Rc is recovered through `from_raw`. unsafe { ptr :: addr_of_mut ! ( ( ptr ) data ) } }
Provides a raw pointer to the data.
Provides a raw pointer to the data .
this
&Self
this
&Self
examples


let x = StrongArc::new("hello".to_owned());
let y = StrongArc::clone(&x);
let x_ptr = StrongArc::as_ptr(&x);
assert_eq!(x_ptr, StrongArc::as_ptr(&y));
assert_eq!(unsafe { &*x_ptr }, "hello");
```
let x = StrongArc :: new ( " hello " . to_owned () ) ; let y = StrongArc :: clone ( &x ) ; let x_ptr = StrongArc :: as_ptr ( &x ) ; assert_eq! ( x_ptr StrongArc :: as_ptr ( &y )) ; assert_eq! ( unsafe { & * x_ptr } " hello " ) ; ` ` `