TemplateOptions

Struct TemplateOptions 

Source
pub struct TemplateOptions {
    pub node_label_template: Option<String>,
    pub node_tooltip_template: Option<String>,
    pub edge_label_template: Option<String>,
    pub edge_tooltip_template: Option<String>,
}
Expand description

Options for Template creation.

Internally, Template uses TinyTemplate for templating, which allows formatting using the {...} syntax.

§Node template values

  • short: Short name of the node.
  • extra: Extra information of the node.
  • full: Full name of the node.
  • size: Size of the node in bytes.
  • size_binary: Size of the node in binary format (e.g., “1.0 KiB”).
  • size_decimal: Size of the node in decimal format (e.g., “1.0 kB”).
  • scheme: Coloring scheme used (if any).
  • value: Value used for coloring (if any).
  • value_binary: Value used for coloring in binary format (if any).
  • value_decimal: Value used for coloring in decimal format (if any).
  • features: Features of the node.

§Edge template values

  • source: Short name of the source node.
  • target: Short name of the target node.
  • features: Features of the edge.

Fields§

§node_label_template: Option<String>§node_tooltip_template: Option<String>§edge_label_template: Option<String>§edge_tooltip_template: Option<String>

Trait Implementations§

Source§

impl Debug for TemplateOptions

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for TemplateOptions

Source§

fn default() -> TemplateOptions

Returns the “default value” for a type. 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<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.