tinymist_std::typst::foundations

Trait NativeFunc

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§

fn data() -> &'static NativeFuncData

Get the function data for the native Rust function.

Provided Methods§

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", so this trait is not object safe.

Implementors§