Struct dsntk_model::DmnStyle

source ·
pub struct DmnStyle {
    pub id: String,
    pub fill_color: Option<DcColor>,
    pub stroke_color: Option<DcColor>,
    pub font_color: Option<DcColor>,
    pub font_family: Option<String>,
    pub font_size: Option<f64>,
    pub font_italic: Option<bool>,
    pub font_bold: Option<bool>,
    pub font_underline: Option<bool>,
    pub font_strike_through: Option<bool>,
    pub label_horizontal_alignment: Option<DcAlignmentKind>,
    pub label_vertical_alignment: Option<DcAlignmentKind>,
}
Expand description

DmnStyle is used to keep some non-normative visual attributes such as color and font.

Fields§

§id: String

A unique identifier for this style so it can be referenced. Only styles defined in the Dmndi can be referenced by DmnDiagramElement and DmnDiagram.

§fill_color: Option<DcColor>

The color use to fill the shape.Does not apply to DmnEdge. Default is white.

§stroke_color: Option<DcColor>

The color use to draw the shape borders. Default is black.

§font_color: Option<DcColor>

The color use to draw the label. Default is black.

§font_family: Option<String>

A comma-separated list of Font Name that can be used to display the text. Default is Arial.

§font_size: Option<f64>

The size in points of the font to use to display the text. Default is 8 points.

§font_italic: Option<bool>

If the text should be displayed in Italic. Default is false.

§font_bold: Option<bool>

If the text should be displayed in Bold. Default is false.

§font_underline: Option<bool>

If the text should be underlined. Default is false.

§font_strike_through: Option<bool>

If the text should be stroke through. Default is false.

§label_horizontal_alignment: Option<DcAlignmentKind>

How text should be positioned horizontally within the Label bounds. Default depends of the DmnDiagramElement the label is attached to (see 13.5).

§label_vertical_alignment: Option<DcAlignmentKind>

How the text should be positioned vertically inside the Label bounds. Default depends of the DmnDiagramElement the label is attached to (see 13.5). Start means top and end means bottom.

Trait Implementations§

source§

impl Clone for DmnStyle

source§

fn clone(&self) -> DmnStyle

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for DmnStyle

source§

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

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<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,

§

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>,

§

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>,

§

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.