Skip to main content

NativeFunc

Trait NativeFunc 

Source
pub trait NativeFunc {
    // Required method
    fn data() -> &'static NativeFuncData;

    // Provided method
    fn func() -> Func { ... }
}
Expand description

A Typst function that is defined by a native Rust type that shadows a native Rust function.

Required Methods§

Source

fn data() -> &'static NativeFuncData

Get the function data for the native Rust function.

Provided Methods§

Source

fn func() -> Func

Get the function for the native Rust type.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§