pub struct StaticModuleEntry { /* private fields */ }Expand description
Static storage for a ModuleEntry and everything it points into.
Mimics how C extensions declare a static zend_module_entry alongside a
static zend_function_entry[]: the extension owns its own tables, and
nothing is shared between extensions.
Implementations§
Source§impl StaticModuleEntry
impl StaticModuleEntry
Sourcepub fn get_or_init(
&self,
f: impl FnOnce() -> (ModuleEntry, ModuleAllocations),
) -> *mut ModuleEntry
pub fn get_or_init( &self, f: impl FnOnce() -> (ModuleEntry, ModuleAllocations), ) -> *mut ModuleEntry
Initialises the entry on first call, returning a stable *mut pointer.
f returns the entry together with the allocations it points into; both
are stored here for the life of the process. Subsequent calls skip f
and return the same pointer.
Trait Implementations§
Source§impl Default for StaticModuleEntry
impl Default for StaticModuleEntry
impl Sync for StaticModuleEntry
Auto Trait Implementations§
impl !Freeze for StaticModuleEntry
impl !RefUnwindSafe for StaticModuleEntry
impl !Send for StaticModuleEntry
impl Unpin for StaticModuleEntry
impl UnsafeUnpin for StaticModuleEntry
impl UnwindSafe for StaticModuleEntry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more