#[repr(C)]pub struct SpecArray<const N: usize, S: 'static> { /* private fields */ }
Expand description
A zero-terminated parameter spec array, followed by handlers.
Implementations
sourceimpl<const N: usize, S: 'static> SpecArray<N, S>
impl<const N: usize, S: 'static> SpecArray<N, S>
sourcepub const unsafe fn new(
specs: [Spec; N],
handlers: [&'static dyn Handler<S>; N]
) -> Self
pub const unsafe fn new(
specs: [Spec; N],
handlers: [&'static dyn Handler<S>; N]
) -> Self
Creates a new spec array.
Users are encouraged to use the define_fs_params
macro to define the
super::Context::PARAMS
constant.
Safety
The type of the elements in handlers
must be compatible with the types in specs. For
example, if specs
declares that the i-th element is a bool then the i-th handler
should be for a bool.
Auto Trait Implementations
impl<const N: usize, S> !RefUnwindSafe for SpecArray<N, S>
impl<const N: usize, S> !Send for SpecArray<N, S>
impl<const N: usize, S> !Sync for SpecArray<N, S>
impl<const N: usize, S> Unpin for SpecArray<N, S>
impl<const N: usize, S> !UnwindSafe for SpecArray<N, S>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more