pub struct VocabularyDetail {
pub tree: VocabularyTree,
pub subtree_of: Option<String>,
pub node_count: usize,
pub depth: usize,
}Expand description
What the ACTION hands the renderer for describe: the tree plus the
render decisions only the action can make, because only it sees --subtree.
The split is deliberate and is what makes the layer ownership structural
rather than a convention: describe_vocabulary (the client) returns a
bare VocabularyTree, so the client has no node_count field to fill
in even by accident.
Fields§
§tree: VocabularyTree§subtree_of: Option<String>Set by the action from --subtree (D14): the node IRI to narrow
RENDERING to. None renders the whole vocabulary.
node_count: usizeNodes RENDERED (honouring subtree_of). Equals the tabular data-row
count in both whole-vocabulary and --subtree mode (D15). Computed
by the action via VocabularyTree::count_and_depth.
depth: usizeDeepest level of what is RENDERED (a root’s direct children sit at
level 1). Under --subtree this is branch-relative — the addressed
node itself is level 1 of its own branch, so a leaf renders 1 node · 1 level. The per-node depth COLUMN the renderer derives separately
stays absolute, so it never disagrees with number’s segment count.
Trait Implementations§
Source§impl Clone for VocabularyDetail
impl Clone for VocabularyDetail
Source§fn clone(&self) -> VocabularyDetail
fn clone(&self) -> VocabularyDetail
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for VocabularyDetail
impl Debug for VocabularyDetail
impl Eq for VocabularyDetail
Source§impl PartialEq for VocabularyDetail
impl PartialEq for VocabularyDetail
impl StructuralPartialEq for VocabularyDetail
Auto Trait Implementations§
impl Freeze for VocabularyDetail
impl RefUnwindSafe for VocabularyDetail
impl Send for VocabularyDetail
impl Sync for VocabularyDetail
impl Unpin for VocabularyDetail
impl UnsafeUnpin for VocabularyDetail
impl UnwindSafe for VocabularyDetail
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.