From bfb62302cbdc9a667ef0a0d74e7a4f23ed37a5ca Mon Sep 17 00:00:00 2001 From: Richard Newman Date: Mon, 13 Feb 2017 19:39:47 -0800 Subject: [PATCH] Add docstrings for Schema methods. --- core/src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/src/lib.rs b/core/src/lib.rs index b03a997f..c85b5534 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -224,10 +224,12 @@ impl Schema { self.schema_map.get(&x) } + /// Return true if the provided entid identifies an attribute in this schema. pub fn is_attribute(&self, x: Entid) -> bool { self.schema_map.contains_key(&x) } + /// Return true if the provided ident identifies an attribute in this schema. pub fn identifies_attribute(&self, x: &String) -> bool { self.get_entid(x).map(|e| self.is_attribute(e)).unwrap_or(false) }