pub struct Signature {
pub functions_by_name: HashMap<&'static str, FunctionDefinition>,
pub functions_by_typ: HashMap<TypeShape, Vec<FunctionDefinition>>,
pub functions: Vec<FunctionDefinition>,
pub types_by_name: HashMap<&'static str, TypeShape>,
}
Expand description
Records a universe of functions. Signatures are containers for types and function symbols. They hold references to the concrete implementations of functions and the types of variables.
Fields§
§functions_by_name: HashMap<&'static str, FunctionDefinition>
§functions_by_typ: HashMap<TypeShape, Vec<FunctionDefinition>>
§functions: Vec<FunctionDefinition>
§types_by_name: HashMap<&'static str, TypeShape>
Implementations§
source§impl Signature
impl Signature
sourcepub fn new(definitions: Vec<FunctionDefinition>) -> Signature
pub fn new(definitions: Vec<FunctionDefinition>) -> Signature
Construct a Signature
from the given FunctionDefinition
s.
sourcepub fn new_function<F, Types>(f: &'static F) -> Functionwhere
F: DescribableFunction<Types> + 'static,
pub fn new_function<F, Types>(f: &'static F) -> Functionwhere
F: DescribableFunction<Types> + 'static,
pub fn new_var_with_type<T: 'static, M: Matcher>(
source: Option<Source>,
matcher: Option<M>,
counter: u16
) -> Variable<M>
pub fn new_var<M: Matcher>(
type_shape: TypeShape,
source: Option<Source>,
matcher: Option<M>,
counter: u16
) -> Variable<M>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Signature
impl Send for Signature
impl Sync for Signature
impl Unpin for Signature
impl !UnwindSafe for Signature
Blanket Implementations§
§impl<Tail, T> Prepend<T> for Tail
impl<Tail, T> Prepend<T> for Tail
§type PreprendResult = Tail
type PreprendResult = Tail
The Resulting [
TupleList
], of an [Prepend::prepend()
] call,
including the prepended entry.