pub trait NativeType {
const NAME: &'static str;
// Required method
fn data() -> &'static NativeTypeData;
// Provided method
fn ty() -> Type { ... }
}Expand description
A Typst type that is defined by a native Rust type.
Required Associated Constants§
Required Methods§
fn data() -> &'static NativeTypeData
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl NativeType for RootedPath
impl NativeType for RootedPath
Source§impl NativeType for bool
A type with two states.
impl NativeType for bool
A type with two states.
Source§impl NativeType for f64
A floating-point number.
impl NativeType for f64
A floating-point number.
Source§impl NativeType for i64
An integer: a positive whole number, a negative whole number, or zero.
impl NativeType for i64
An integer: a positive whole number, a negative whole number, or zero.