pub struct IniEntryDefs<const N: usize>(/* private fields */);Expand description
A static-able table of IniEntryDef.
IniEntryDef holds raw pointers, so an array of them is not Sync and
cannot be a static on its own. This wrapper is the crate’s equivalent of a
C extension’s zend_ini_entry_def[] in .rodata.
Implementations§
Source§impl<const N: usize> IniEntryDefs<N>
impl<const N: usize> IniEntryDefs<N>
Sourcepub const fn new(entries: [IniEntryDef; N]) -> Self
pub const fn new(entries: [IniEntryDef; N]) -> Self
Wraps an INI definition table so it can live in a static.
The last entry must be IniEntryDef::end.
Sourcepub const fn as_slice(&self) -> &[IniEntryDef] ⓘ
pub const fn as_slice(&self) -> &[IniEntryDef] ⓘ
Returns the table as a slice, for IniEntryDef::register.
Trait Implementations§
impl<const N: usize> Sync for IniEntryDefs<N>
Auto Trait Implementations§
impl<const N: usize> !Send for IniEntryDefs<N>
impl<const N: usize> Freeze for IniEntryDefs<N>
impl<const N: usize> RefUnwindSafe for IniEntryDefs<N>
impl<const N: usize> Unpin for IniEntryDefs<N>
impl<const N: usize> UnsafeUnpin for IniEntryDefs<N>
impl<const N: usize> UnwindSafe for IniEntryDefs<N>
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