pub struct DbNode {
pub name: String,
pub alias_of: Option<String>,
}Expand description
One node of the list C’s dbFirstRecord / dbNextRecord pair walks.
C keeps records and aliases in a single per-record-type recList:
dbCreateAlias ellAdds the alias node into the very list the records
live in (dbStaticLib.c:1703). A walk that wants records only therefore
has to SAY so — if (dbIsAlias(pdbentry)) continue, as dbjlr
(dbJLink.c:520) and dbcar (dbCaTest.c:85) do — and a walk that says
nothing lists both, as dbl (dbTest.c:180-185) and dbglob
(:325-333) do.
This port holds the two in separate maps, so “record or alias” was a
question each caller answered for itself, and every caller that answered
it by walking all_record_names alone answered it wrong for aliases with
no way to notice. PvDatabase::all_db_nodes reassembles C’s one list;
alias_of is dbIsAlias.
Fields§
§name: StringThe name this node is reached by — an alias node carries the ALIAS
name, which is what C prints from dbGetRecordName.
alias_of: Option<String>The record an alias node stands for, or None for a record node.
Trait Implementations§
impl Eq for DbNode
impl StructuralPartialEq for DbNode
Auto Trait Implementations§
impl Freeze for DbNode
impl RefUnwindSafe for DbNode
impl Send for DbNode
impl Sync for DbNode
impl Unpin for DbNode
impl UnsafeUnpin for DbNode
impl UnwindSafe for DbNode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.