mirror of
https://github.com/typst/typst
synced 2025-05-14 17:15:28 +08:00
Expose function details
This commit is contained in:
parent
efdb75558f
commit
8ccda48c9a
@ -144,7 +144,7 @@ pub struct Func {
|
|||||||
|
|
||||||
/// The different kinds of function representations.
|
/// The different kinds of function representations.
|
||||||
#[derive(Clone, PartialEq, Hash)]
|
#[derive(Clone, PartialEq, Hash)]
|
||||||
enum Repr {
|
pub enum Repr {
|
||||||
/// A native Rust function.
|
/// A native Rust function.
|
||||||
Native(Static<NativeFuncData>),
|
Native(Static<NativeFuncData>),
|
||||||
/// A function for an element.
|
/// A function for an element.
|
||||||
@ -353,6 +353,11 @@ impl Func {
|
|||||||
}
|
}
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// The function's repr
|
||||||
|
pub fn inner(&self) -> &Repr {
|
||||||
|
&self.repr
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[scope]
|
#[scope]
|
||||||
|
@ -20,7 +20,7 @@ mod duration;
|
|||||||
mod element;
|
mod element;
|
||||||
mod fields;
|
mod fields;
|
||||||
mod float;
|
mod float;
|
||||||
mod func;
|
pub mod func;
|
||||||
mod int;
|
mod int;
|
||||||
mod label;
|
mod label;
|
||||||
mod module;
|
mod module;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user