Skip to main content

IniEntryDefs

Struct IniEntryDefs 

Source
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>

Source

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.

Source

pub const fn as_slice(&self) -> &[IniEntryDef] ⓘ

Returns the table as a slice, for IniEntryDef::register.

Trait Implementations§

Source§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.