Skip to main content

LabelSubstContext

Struct LabelSubstContext 

Source
pub struct LabelSubstContext<'a> {
    pub node_name: &'a str,
    pub graph_name: &'a str,
    pub tail_name: &'a str,
    pub head_name: &'a str,
    pub is_edge: bool,
    pub is_directed: bool,
    pub tail_port: Option<&'a str>,
    pub head_port: Option<&'a str>,
    pub label_text: &'a str,
    pub pen_color: Option<&'a str>,
    pub is_node: bool,
    pub has_label: bool,
}
Expand description

Context for Graphviz object-based escape sequence substitution (\N, \G, \T, \H, \E, \L).

Fields§

§node_name: &'a str§graph_name: &'a str§tail_name: &'a str§head_name: &'a str§is_edge: bool§is_directed: bool§tail_port: Option<&'a str>§head_port: Option<&'a str>§label_text: &'a str§pen_color: Option<&'a str>

getPenColor(obj) (pencolor, else color), which an HTML label’s outermost table without a COLOR takes (make_html_label).

§is_node: bool

The object is a node (its name may be empty).

§has_label: bool

The object has a main label (ND_label, ED_label, GD_label), whose text is label_text even when empty; without one \L stays literal.

Implementations§

Source§

impl<'a> LabelSubstContext<'a>

Source

pub const fn for_node(node_name: &'a str) -> Self

Creates a substitution context for a node with the given name.

Trait Implementations§

Source§

impl<'a> Clone for LabelSubstContext<'a>

Source§

fn clone(&self) -> LabelSubstContext<'a>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Debug for LabelSubstContext<'a>

Source§

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

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

impl<'a> Default for LabelSubstContext<'a>

Source§

fn default() -> LabelSubstContext<'a>

Returns the “default value” for a type. Read more
Source§

impl<'a> Eq for LabelSubstContext<'a>

Source§

impl<'a> PartialEq for LabelSubstContext<'a>

Source§

fn eq(&self, other: &LabelSubstContext<'a>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<'a> StructuralPartialEq for LabelSubstContext<'a>

Auto Trait Implementations§

§

impl<'a> Freeze for LabelSubstContext<'a>

§

impl<'a> RefUnwindSafe for LabelSubstContext<'a>

§

impl<'a> Send for LabelSubstContext<'a>

§

impl<'a> Sync for LabelSubstContext<'a>

§

impl<'a> Unpin for LabelSubstContext<'a>

§

impl<'a> UnsafeUnpin for LabelSubstContext<'a>

§

impl<'a> UnwindSafe for LabelSubstContext<'a>

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.