Skip to main content

RuntimeConfigInput

Struct RuntimeConfigInput 

Source
pub struct RuntimeConfigInput {
Show 16 fields pub layout_engine: Option<String>, pub cluster_ranksep: Option<f64>, pub padding: Option<usize>, pub svg_scale: Option<f64>, pub edge_preset: Option<String>, pub routing_style: Option<String>, pub curve: Option<String>, pub edge_radius: Option<f64>, pub svg_diagram_padding: Option<f64>, pub svg_node_padding_x: Option<f64>, pub svg_node_padding_y: Option<f64>, pub show_ids: Option<bool>, pub color: Option<String>, pub geometry_level: Option<String>, pub path_simplification: Option<String>, pub layout: Option<LayoutConfigInput>,
}
Expand description

Serde-friendly config input for JSON consumers (WASM, API). Serde-friendly render config accepted from JSON callers.

All enum-valued fields are Option<String> so that consumers can pass normalized or user-typed values. Conversion to the typed RenderConfig happens in into_render_config.

Fields§

§layout_engine: Option<String>§cluster_ranksep: Option<f64>§padding: Option<usize>§svg_scale: Option<f64>§edge_preset: Option<String>§routing_style: Option<String>§curve: Option<String>§edge_radius: Option<f64>§svg_diagram_padding: Option<f64>§svg_node_padding_x: Option<f64>§svg_node_padding_y: Option<f64>§show_ids: Option<bool>§color: Option<String>§geometry_level: Option<String>§path_simplification: Option<String>§layout: Option<LayoutConfigInput>

Implementations§

Source§

impl RuntimeConfigInput

Source

pub fn into_render_config(self) -> Result<RenderConfig, RenderError>

Validate and convert into a typed RenderConfig.

Trait Implementations§

Source§

impl Debug for RuntimeConfigInput

Source§

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

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

impl Default for RuntimeConfigInput

Source§

fn default() -> RuntimeConfigInput

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

impl<'de> Deserialize<'de> for RuntimeConfigInput

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. 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.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,