pub struct FunctionRegistration {
pub rust_symbol: &'static str,
pub excel_name: &'static str,
pub signature: FunctionSignature,
pub category: Option<&'static str>,
pub description: Option<&'static str>,
pub argument_names: &'static [&'static str],
pub argument_descriptions: &'static [&'static str],
pub flags: FunctionFlags,
}Expand description
Complete static registration metadata for one worksheet function.
Fields§
§rust_symbol: &'static strUnmangled Rust-export thunk name.
excel_name: &'static strExcel-visible worksheet-function name.
signature: FunctionSignatureResult and parameter type codes.
category: Option<&'static str>Optional Excel category.
description: Option<&'static str>Optional Excel-visible function description.
argument_names: &'static [&'static str]Excel-visible parameter names excluding the internal async handle.
argument_descriptions: &'static [&'static str]Excel-visible parameter help, parallel to Self::argument_names.
flags: FunctionFlagsRegistration modifiers.
Implementations§
Source§impl FunctionRegistration
impl FunctionRegistration
Sourcepub const fn is_asynchronous(&self) -> bool
pub const fn is_asynchronous(&self) -> bool
Returns whether this descriptor has the verified async >/X shape.
Sourcepub const fn new(
rust_symbol: &'static str,
excel_name: &'static str,
signature: FunctionSignature,
) -> Self
pub const fn new( rust_symbol: &'static str, excel_name: &'static str, signature: FunctionSignature, ) -> Self
Creates function metadata with no optional category, help, or modifiers.
Sourcepub const fn description(self, description: &'static str) -> Self
pub const fn description(self, description: &'static str) -> Self
Adds Excel-visible function help text.
Sourcepub const fn arguments(
self,
names: &'static [&'static str],
descriptions: &'static [&'static str],
) -> Self
pub const fn arguments( self, names: &'static [&'static str], descriptions: &'static [&'static str], ) -> Self
Adds parameter names and matching Excel-visible help text.
Sourcepub const fn flags(self, flags: FunctionFlags) -> Self
pub const fn flags(self, flags: FunctionFlags) -> Self
Sets registration modifiers after validating them with Self::validate.
Sourcepub fn type_text(&self) -> Result<String, RegistrationError>
pub fn type_text(&self) -> Result<String, RegistrationError>
Builds canonical Excel registration type text after validation.
Sourcepub fn validate(&self) -> Result<(), RegistrationError>
pub fn validate(&self) -> Result<(), RegistrationError>
Validates names, argument metadata, modifiers, and async shape.