INNER CODE UNIT · Rust

alloc

lurk-lab/lurk-beta · foil/src/lib.rs:262

    pub fn alloc<L: Into<Label>>(&mut self, label: L) -> Vert {
        let l = label.into();
        let vert = self.graph.alloc(l.clone(), M::default());
        self.register(&l, &vert);
        vert
    }
    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);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…