Theme

Struct Theme 

Source
pub struct Theme {
Show 28 fields pub name: String, pub background: String, pub participant_fill: String, pub participant_stroke: String, pub participant_text: String, pub participant_shape: ParticipantShape, pub lifeline_color: String, pub lifeline_style: LifelineStyle, pub message_color: String, pub message_text_color: String, pub note_fill: String, pub note_stroke: String, pub note_text_color: String, pub activation_fill: String, pub activation_stroke: String, pub block_stroke: String, pub block_label_fill: String, pub block_fill: String, pub font_family: String, pub actor_fill: String, pub actor_stroke: String, pub state_fill: String, pub state_stroke: String, pub state_text_color: String, pub ref_fill: String, pub ref_stroke: String, pub ref_text_color: String, pub description_text_color: String,
}
Expand description

Theme colors and styles

Fields§

§name: String

Theme name

§background: String

Background color

§participant_fill: String

Participant box fill color

§participant_stroke: String

Participant box stroke color

§participant_text: String

Participant text color

§participant_shape: ParticipantShape

Participant box shape

§lifeline_color: String

Lifeline color

§lifeline_style: LifelineStyle

Lifeline style

§message_color: String

Message line color

§message_text_color: String

Message text color

§note_fill: String

Note background color

§note_stroke: String

Note stroke color

§note_text_color: String

Note text color

§activation_fill: String

Activation box fill color

§activation_stroke: String

Activation box stroke color

§block_stroke: String

Block stroke color

§block_label_fill: String

Block label background

§block_fill: String

Block background fill (inside the block area)

§font_family: String

Font family

§actor_fill: String

Actor head fill color

§actor_stroke: String

Actor stroke color

§state_fill: String

State box fill color

§state_stroke: String

State box stroke color

§state_text_color: String

State text color

§ref_fill: String

Ref box fill color

§ref_stroke: String

Ref box stroke color

§ref_text_color: String

Ref text color

§description_text_color: String

Description text color

Implementations§

Source§

impl Theme

Source

pub fn default_theme() -> Self

Default theme (simple black and white)

Source

pub fn modern_blue() -> Self

Modern blue theme

Source

pub fn modern_green() -> Self

Modern green theme

Source

pub fn rose() -> Self

Rose/pink theme with circles

Source

pub fn napkin() -> Self

Napkin/sketch style theme

Source

pub fn earth() -> Self

Earth tones theme

Source

pub fn plain() -> Self

Plain monochrome theme

Source

pub fn mellow() -> Self

Mellow/pastel theme with circles

Source

pub fn blue_outline() -> Self

Blue outline theme

Source

pub fn warm() -> Self

Orange/yellow warm theme

Source

pub fn gray() -> Self

Gray professional theme

Source

pub fn dark_green() -> Self

Dark theme with vibrant green accents

Source

pub fn by_name(name: &str) -> Option<Self>

Get theme by name

Source

pub fn available_themes() -> Vec<&'static str>

List all available theme names

Trait Implementations§

Source§

impl Clone for Theme

Source§

fn clone(&self) -> Theme

Returns a duplicate 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 Theme

Source§

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

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

impl Default for Theme

Source§

fn default() -> Self

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

Auto Trait Implementations§

§

impl Freeze for Theme

§

impl RefUnwindSafe for Theme

§

impl Send for Theme

§

impl Sync for Theme

§

impl Unpin for Theme

§

impl UnwindSafe for Theme

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.