pub struct TreeOptions {
pub ignore_missing: bool,
}Expand description
Options controlling how Graph::tree_with materializes a spanning
target that does not resolve on disk.
The default (tree()’s behavior) materializes a NodeKind::Missing
node for every such target, so a caller can report which link is broken.
Some callers instead want the tree to look exactly as if the dead link were
never declared — an editor’s outline view, say, which has nothing useful to
render for a node with no title, no children, and no file. ignore_missing
is the additive escape hatch for that: it only ever removes nodes the
default would have included, so a workspace with no broken links traverses
identically either way.
Fields§
§ignore_missing: boolWhen true, a spanning target that does not exist on disk is omitted
from its parent’s children entirely, rather than becoming a
NodeKind::Missing node. Default: false.
Trait Implementations§
Source§impl Clone for TreeOptions
impl Clone for TreeOptions
Source§fn clone(&self) -> TreeOptions
fn clone(&self) -> TreeOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for TreeOptions
Source§impl Debug for TreeOptions
impl Debug for TreeOptions
Source§impl Default for TreeOptions
impl Default for TreeOptions
Source§fn default() -> TreeOptions
fn default() -> TreeOptions
impl Eq for TreeOptions
Source§impl PartialEq for TreeOptions
impl PartialEq for TreeOptions
impl StructuralPartialEq for TreeOptions
Auto Trait Implementations§
impl Freeze for TreeOptions
impl RefUnwindSafe for TreeOptions
impl Send for TreeOptions
impl Sync for TreeOptions
impl Unpin for TreeOptions
impl UnsafeUnpin for TreeOptions
impl UnwindSafe for TreeOptions
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.