Trait NativeElement
pub trait NativeElement:
Debug
+ Clone
+ PartialEq
+ Hash
+ Construct
+ Set
+ Capable
+ Fields
+ Repr
+ Send
+ Sync
+ 'static {
// Required method
fn data() -> &'static NativeElementData
where Self: Sized;
// Provided methods
fn elem() -> Element
where Self: Sized { ... }
fn pack(self) -> Content
where Self: Sized { ... }
}
Expand description
A Typst element that is defined by a native Rust type.
Required Methods§
fn data() -> &'static NativeElementDatawhere
Self: Sized,
fn data() -> &'static NativeElementDatawhere
Self: Sized,
Get the element data for the native Rust element.
Provided Methods§
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.