Add docstrings for Schema methods.
This commit is contained in:
parent
a87e5a3ec7
commit
bfb62302cb
1 changed files with 2 additions and 0 deletions
|
@ -224,10 +224,12 @@ impl Schema {
|
||||||
self.schema_map.get(&x)
|
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 {
|
pub fn is_attribute(&self, x: Entid) -> bool {
|
||||||
self.schema_map.contains_key(&x)
|
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 {
|
pub fn identifies_attribute(&self, x: &String) -> bool {
|
||||||
self.get_entid(x).map(|e| self.is_attribute(e)).unwrap_or(false)
|
self.get_entid(x).map(|e| self.is_attribute(e)).unwrap_or(false)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue