pub struct PrimOpMeta<'a, const N: usize> {
pub name: &'a CStr,
pub doc: &'a CStr,
pub args: [&'a CStr; N],
}Expand description
Metadata for a primop, used with PrimOp::new.
Fields§
§name: &'a CStrName of the primop. Note that primops do not have to be registered as builtins. Nonetheless, a name is required for documentation purposes, e.g. :doc in the repl.
doc: &'a CStrDocumentation for the primop. This is displayed in the repl when using :doc. The format is markdown.
args: [&'a CStr; N]The number of arguments the function takes, as well as names for the arguments, to be presented in the documentation (if applicable, e.g. :doc in the repl).
Auto Trait Implementations§
impl<'a, const N: usize> Freeze for PrimOpMeta<'a, N>
impl<'a, const N: usize> RefUnwindSafe for PrimOpMeta<'a, N>
impl<'a, const N: usize> Send for PrimOpMeta<'a, N>
impl<'a, const N: usize> Sync for PrimOpMeta<'a, N>
impl<'a, const N: usize> Unpin for PrimOpMeta<'a, N>
impl<'a, const N: usize> UnwindSafe for PrimOpMeta<'a, 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