Skip to main content

AsCtxPtr

Trait AsCtxPtr 

Source
pub trait AsCtxPtr {
    // Provided method
    fn as_ctx_ptr(&self) -> *mut Self
       where Self: Sized { ... }
}
Expand description

&self*mut Self with shared provenance, for C-callback / scopeguard ctx slots. See module-level comment above for the safety contract.

Provided Methods§

Source

fn as_ctx_ptr(&self) -> *mut Self
where Self: Sized,

self’s address as *mut Self for deferred-task / scopeguard / ref_guard ctx slots. The closures/trampolines deref it as shared (&*p) — every method they reach is &self post-R-2, so no write provenance is required; the *mut spelling is purely to match the existing DerefOnDrop / HasAutoFlush / RefCount ABI.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T: ?Sized> AsCtxPtr for T