INNER CODE UNIT · Rust
alloc_var
lurk-lab/lurk-beta · foil/src/lib.rs:268
pub fn alloc_var(&mut self, name: &'static str) -> Vert {
self.alloc(Var::new(name))
}
pub fn alloc_unique_var<S: Into<String>>(&mut self, name: S) -> Vert {
let var = self.unique_var(name);
self.alloc(var)
}
pub fn alloc_with_meta<L: Into<Label>, MM: Into<M>>(&mut self, label: L, meta: MM) -> Vert {
let l = label.into();
let meta = meta.into();
let vert = self.graph.alloc(l.clone(), meta);
self.register(&l, &vert);
vert
}
pub fn alloc_var_with_meta<MM: Into<M>, S: Into<String>>(&mut self, name: S, meta: MM) -> Vert {
self.alloc_with_meta(Var::new(name), meta)
}
pub fn alloc_unique_var_with_meta<MM: Into<M>, S: Into<String>>(