Skip to main content

FuncDescriptor

Struct FuncDescriptor 

Source
#[repr(C)]
pub struct FuncDescriptor { pub name: &'static str, pub canonical_iri: CanonicalIri, pub stable_id: StableFuncId, pub params: &'static [ParamSpec], pub output_kind: PrimitiveKind, pub required_output_elems: u32, pub effects: EffectSet, pub determinism: DeterminismGuarantee, pub reversibility: ReversibilityKind, pub envelope: ResourceEnvelope, pub contract: OntologicalContract, }
Expand description

Static descriptor for a single extension function.

Fields§

§name: &'static str

Short function name within its sub-namespace (e.g. "verlet_step").

§canonical_iri: CanonicalIri

Globally unique canonical IRI + q_hash.

§stable_id: StableFuncId

Provider-scoped stable (sub_namespace_id, func_id).

§params: &'static [ParamSpec]

Static parameter specifications.

§output_kind: PrimitiveKind

Output element primitive kind written to CallerOutputSlice.

§required_output_elems: u32

Exact or worst-case number of output elements required per call.

§effects: EffectSet

Declared effect bitmask.

§determinism: DeterminismGuarantee

Declared determinism guarantee.

§reversibility: ReversibilityKind

Declared reversibility / undo classification.

§envelope: ResourceEnvelope

Worst-case resource envelope enforced at admission and runtime.

§contract: OntologicalContract

Self-describing ontological contract and NQuin48 span offsets.

Implementations§

Source§

impl FuncDescriptor

Source

pub const fn async_class(&self) -> AsyncExecutionClass

Returns the synchronous vs bounded-async execution classification encoded in envelope.flags.

Source§

impl FuncDescriptor

Source

pub const fn const_new( name: &'static str, canonical_iri_str: &'static str, stable_id: StableFuncId, schema_sig_str: &str, params: &'static [ParamSpec], output_kind: PrimitiveKind, required_output_elems: u32, effects: EffectSet, determinism: DeterminismGuarantee, reversibility: ReversibilityKind, envelope: ResourceEnvelope, pre_span: (u32, u32), post_span: (u32, u32), inv_span: (u32, u32), ) -> Self

Compile-time constructor that computes CanonicalIri, schema_hash, and the canonical 32-byte OntologicalContract::canonical_digest automatically.

Source

pub const fn const_new_with_async( name: &'static str, canonical_iri_str: &'static str, stable_id: StableFuncId, schema_sig_str: &str, params: &'static [ParamSpec], output_kind: PrimitiveKind, required_output_elems: u32, effects: EffectSet, determinism: DeterminismGuarantee, reversibility: ReversibilityKind, async_class: AsyncExecutionClass, envelope: ResourceEnvelope, pre_span: (u32, u32), post_span: (u32, u32), inv_span: (u32, u32), ) -> Self

Compile-time constructor that additionally encodes AsyncExecutionClass into envelope.flags.

Trait Implementations§

Source§

impl Clone for FuncDescriptor

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for FuncDescriptor

Source§

impl Debug for FuncDescriptor

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for FuncDescriptor

Source§

impl PartialEq for FuncDescriptor

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for FuncDescriptor

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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.