pub struct Native {
pub name: String,
pub internal_uniq: Option<u64>,
pub host_symbol: String,
pub intrinsic: Option<String>,
pub class: String,
pub arguments: Vec<Argument>,
pub result_type: TypeDescriptor,
}Fields§
§name: String§internal_uniq: Option<u64>Which of the natives sharing name this is (ecAdd on each
curve, each instantiation of a generic), matched against
Expression::Call::function_uniq. Absent in older fixtures.
host_symbol: String§intrinsic: Option<String>Language-agnostic intrinsic name (schema v3, optional). When
absent, Self::resolve_intrinsic falls back to stripping any
"__compactRuntime." prefix from Self::host_symbol.
class: String§arguments: Vec<Argument>§result_type: TypeDescriptorImplementations§
Source§impl Native
impl Native
Sourcepub fn new_intrinsic(
name: impl Into<String>,
intrinsic: impl Into<String>,
class: impl Into<String>,
arguments: Vec<Argument>,
result_type: TypeDescriptor,
) -> Self
pub fn new_intrinsic( name: impl Into<String>, intrinsic: impl Into<String>, class: impl Into<String>, arguments: Vec<Argument>, result_type: TypeDescriptor, ) -> Self
Construct a language-agnostic native entry carrying an explicit
intrinsic identifier.
Sourcepub fn resolve_intrinsic(&self) -> &str
pub fn resolve_intrinsic(&self) -> &str
Resolve the canonical intrinsic name for this native declaration.
Uses Self::intrinsic when present; otherwise strips a leading
"__compactRuntime." prefix from Self::host_symbol, returning
the raw host_symbol if no such prefix exists.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Native
impl<'de> Deserialize<'de> for Native
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Forget for Native
impl Freeze for Nativewhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<Argument>: Freeze,
*const TypeDescriptor is !null: Freeze,
PhantomData<TypeDescriptor>: Freeze,
PhantomData<StructField>: Freeze,
PhantomData<String>: Freeze,
PhantomData<ContractCircuitSig>: Freeze,
impl Move for Native
impl RefUnwindSafe for Native
impl Send for Native
impl Sync for Native
impl Unpin for Native
impl UnsafeUnpin for Nativewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Argument>: UnsafeUnpin,
*const TypeDescriptor is !null: UnsafeUnpin,
PhantomData<TypeDescriptor>: UnsafeUnpin,
PhantomData<StructField>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<ContractCircuitSig>: UnsafeUnpin,
impl UnwindSafe for Native
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