MCPcopy Create free account
hub / github.com/argumentcomputer/ix / ctors

Method ctors

crates/compile/src/mutual.rs:150–155  ·  view source on GitHub ↗

Returns the constructors if this is an inductive, or an empty vec otherwise.

(&self)

Source from the content-addressed store, hash-verified

148
149 /// Returns the constructors if this is an inductive, or an empty vec otherwise.
150 pub fn ctors(&self) -> Vec<ConstructorVal> {
151 match self {
152 Self::Indc(ind) => ind.ctors.clone(),
153 _ => vec![],
154 }
155 }
156 /// Returns `true` if this mutual constant contains the given name
157 /// (including constructor names for inductives).
158 pub fn contains(&self, name: &Name) -> bool {

Callers 2

ctxMethod · 0.80

Calls 1

cloneMethod · 0.45