pub struct Entry {
pub key: String,
/* private fields */
}Expand description
A single entry in the ObjectDB.
Port of LaTeXML::Util::ObjectDB::Entry.
Fields§
§key: StringThe key this entry is stored under.
Implementations§
Source§impl Entry
impl Entry
Sourcepub fn has_value(&self, attr: &str) -> bool
pub fn has_value(&self, attr: &str) -> bool
Check if the entry has a value for the given attribute.
Sourcepub fn get_string(&self, attr: &str) -> Option<&str>
pub fn get_string(&self, attr: &str) -> Option<&str>
Get a string value by attribute name.
Sourcepub fn get_children(&self) -> Vec<String>
pub fn get_children(&self) -> Vec<String>
Get a children list (as string IDs).
Sourcepub fn set_values(&mut self, pairs: Vec<(&str, Value)>)
pub fn set_values(&mut self, pairs: Vec<(&str, Value)>)
Set multiple attribute-value pairs.
Port of Entry::setValues.
Sourcepub fn push_values(&mut self, attr: &str, values: Vec<Value>)
pub fn push_values(&mut self, attr: &str, values: Vec<Value>)
Push values onto a list attribute.
Port of Entry::pushValues.
Sourcepub fn push_new(&mut self, attr: &str, values: Vec<Value>)
pub fn push_new(&mut self, attr: &str, values: Vec<Value>)
Push values onto a list attribute, skipping duplicates.
Port of Entry::pushNew.
Sourcepub fn note_association(&mut self, keys: &[&str])
pub fn note_association(&mut self, keys: &[&str])
Create nested hash association.
Port of Entry::noteAssociation.
noteAssociation("referrers", "parent_id") creates {referrers => {parent_id => 1}}
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Entry
impl !Send for Entry
impl !Sync for Entry
impl !UnwindSafe for Entry
impl Freeze for Entry
impl Unpin for Entry
impl UnsafeUnpin for Entry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more