Skip to main content

DiagnosticableTreeNode

Struct DiagnosticableTreeNode 

Source
pub struct DiagnosticableTreeNode { /* private fields */ }
Expand description

DiagnosticsNode for an instance of DiagnosticableTree.

Implementations§

Source§

impl DiagnosticableTreeNode

Source

pub fn new( name: impl IntoPropertyName, value: &impl DiagnosticableTree, style: Option<DiagnosticsTreeStyle>, ) -> DiagnosticableTreeNode

Creates a node for value, filling its properties and children eagerly.

Source

pub fn from_parts( name: impl IntoPropertyName, description: impl Into<String>, builder: DiagnosticPropertiesBuilder, children: Vec<Rc<dyn DiagnosticsNode>>, ) -> DiagnosticableTreeNode

Creates a tree node from a description, properties, style and children already collected from a value.

This is how an arena object’s node is built: read the object and its children with &App, fill a DiagnosticPropertiesBuilder, and pass both.

Source

pub fn with_style(self, style: DiagnosticsTreeStyle) -> DiagnosticableTreeNode

Sets the node’s style, as Dart’s toDiagnosticsNode(style:) does.

Source

pub fn with_value_id(self, id: HandleId) -> DiagnosticableTreeNode

Names the arena object this node was read from; see DiagnosticsNode::value_id.

Source

pub fn description(&self) -> &str

The node’s short description.

Source

pub fn properties(&self) -> &[Rc<dyn DiagnosticsNode>]

The node’s collected properties.

Source

pub fn children(&self) -> &[Rc<dyn DiagnosticsNode>]

The node’s children.

Trait Implementations§

Source§

impl DiagnosticsNode for DiagnosticableTreeNode

Source§

fn name(&self) -> Option<&str>

Label describing the node, typically shown before a separator.
Source§

fn to_description( &self, parent_configuration: Option<&TextTreeConfiguration>, ) -> String

Returns a description with a short summary of the node itself not including children or properties.
Source§

fn show_separator(&self) -> bool

Whether to show a separator between name and to_description.
Source§

fn level(&self) -> DiagnosticLevel

Priority level of the diagnostic.
Source§

fn show_name(&self) -> bool

Whether the name of the property should be shown when showing the default view of the tree.
Source§

fn line_prefix(&self) -> Option<&str>

Prefix to include at the start of each line.
Source§

fn empty_body_description(&self) -> Option<&str>

Description to show if the node has no displayed properties or children.
Source§

fn value_id(&self) -> Option<HandleId>

The arena object this node describes, when it describes one. Read more
Source§

fn style(&self) -> Option<DiagnosticsTreeStyle>

Hint for how the node should be displayed.
Source§

fn allow_wrap(&self) -> bool

Whether to wrap text onto multiple lines.
Source§

fn allow_name_wrap(&self) -> bool

Whether to wrap the name onto multiple lines.
Source§

fn allow_truncate(&self) -> bool

Whether to allow truncation when displaying the node and its children.
Source§

fn get_properties(&self) -> Vec<Rc<dyn DiagnosticsNode>>

Properties of this node.
Source§

fn get_children(&self) -> Vec<Rc<dyn DiagnosticsNode>>

Children of this node.
Source§

fn to_json_map( &self, delegate: &dyn DiagnosticsSerializationDelegate, ) -> Map<String, Value>

Serializes the node to a JSON map according to the configuration provided in the DiagnosticsSerializationDelegate: Dart’s toJsonMap. Read more
Source§

fn to_string_deep_with( &self, prefix_line_one: &str, prefix_other_lines: Option<&str>, parent_configuration: Option<&TextTreeConfiguration>, min_level: DiagnosticLevel, wrap_width: usize, ) -> String

Returns a string representation of this node and its descendants. Read more
Source§

fn is_filtered(&self, min_level: DiagnosticLevel) -> bool

Whether the diagnostic should be filtered because its level is lower than min_level.
Source§

fn value(&self) -> Option<&(dyn Any + 'static)>

The actual object this diagnostics data is for. Read more
Source§

fn type_name(&self) -> &'static str

Dart’s Object.runtimeType.toString(): the class name, as JSON’s type prints it.
Source§

fn text_tree_configuration(&self) -> Option<&TextTreeConfiguration>

Configuration specifying how this node should be rendered as text art.
Source§

fn separator(&self) -> &str

Dart’s _separator.
Source§

fn to_timeline_arguments(&self) -> Option<IndexMap<String, String>>

Converts the properties of this node to a form useful for timeline event arguments. Children are omitted.
Source§

fn to_string_with( &self, parent_configuration: Option<&TextTreeConfiguration>, min_level: DiagnosticLevel, ) -> String

Returns a string representation compatible with the style of the parent if the node is not the root.
Source§

fn to_string_deep(&self) -> String

Returns a string representation of this node and its descendants with Dart’s default arguments.
Source§

impl Display for DiagnosticableTreeNode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToSmolStr for T
where T: Display + ?Sized,

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more