pub struct LayoutPresetBuilder { /* private fields */ }Expand description
Builder for common layout presets.
Implementations§
Source§impl LayoutPresetBuilder
impl LayoutPresetBuilder
Sourcepub fn workflow() -> LayoutPresetBuilder
pub fn workflow() -> LayoutPresetBuilder
Returns a layered workflow preset.
Sourcepub fn tree() -> LayoutPresetBuilder
pub fn tree() -> LayoutPresetBuilder
Returns a tree-shaped layered preset.
Sourcepub fn mind_map() -> LayoutPresetBuilder
pub fn mind_map() -> LayoutPresetBuilder
Returns a radial mind-map preset.
Sourcepub fn freeform() -> LayoutPresetBuilder
pub fn freeform() -> LayoutPresetBuilder
Returns a freeform mind-map preset.
Sourcepub fn new(
engine: impl Into<LayoutEngineId>,
layout: LayoutRequest,
) -> LayoutPresetBuilder
pub fn new( engine: impl Into<LayoutEngineId>, layout: LayoutRequest, ) -> LayoutPresetBuilder
Creates a preset builder for a specific engine.
Sourcepub fn with_engine(
self,
engine: impl Into<LayoutEngineId>,
) -> LayoutPresetBuilder
pub fn with_engine( self, engine: impl Into<LayoutEngineId>, ) -> LayoutPresetBuilder
Uses a different engine.
Sourcepub fn with_layout(self, layout: LayoutRequest) -> LayoutPresetBuilder
pub fn with_layout(self, layout: LayoutRequest) -> LayoutPresetBuilder
Uses a different layout request.
Sourcepub fn with_options(self, options: LayoutOptions) -> LayoutPresetBuilder
pub fn with_options(self, options: LayoutOptions) -> LayoutPresetBuilder
Sets layout options.
Sourcepub fn with_direction(self, direction: LayoutDirection) -> LayoutPresetBuilder
pub fn with_direction(self, direction: LayoutDirection) -> LayoutPresetBuilder
Uses a different layered layout direction.
Sourcepub fn with_spacing(self, spacing: LayoutSpacing) -> LayoutPresetBuilder
pub fn with_spacing(self, spacing: LayoutSpacing) -> LayoutPresetBuilder
Uses a different layered spacing profile.
Sourcepub fn with_margin(self, margin: CanvasSize) -> LayoutPresetBuilder
pub fn with_margin(self, margin: CanvasSize) -> LayoutPresetBuilder
Uses a different margin.
Sourcepub fn with_default_node_size(self, size: CanvasSize) -> LayoutPresetBuilder
pub fn with_default_node_size(self, size: CanvasSize) -> LayoutPresetBuilder
Uses a different fallback node size.
Sourcepub fn with_node_origin(self, node_origin: (f32, f32)) -> LayoutPresetBuilder
pub fn with_node_origin(self, node_origin: (f32, f32)) -> LayoutPresetBuilder
Uses a different fallback node origin.
Sourcepub fn all(self) -> LayoutPresetBuilder
pub fn all(self) -> LayoutPresetBuilder
Targets all visible nodes.
Sourcepub fn nodes(
self,
nodes: impl IntoIterator<Item = NodeId>,
) -> LayoutPresetBuilder
pub fn nodes( self, nodes: impl IntoIterator<Item = NodeId>, ) -> LayoutPresetBuilder
Targets a selected set of nodes.
Sourcepub fn with_scope(self, scope: LayoutScope) -> LayoutPresetBuilder
pub fn with_scope(self, scope: LayoutScope) -> LayoutPresetBuilder
Uses a different request scope.
Sourcepub fn with_measured_node_sizes(
self,
sizes: impl IntoIterator<Item = (NodeId, CanvasSize)>,
) -> LayoutPresetBuilder
pub fn with_measured_node_sizes( self, sizes: impl IntoIterator<Item = (NodeId, CanvasSize)>, ) -> LayoutPresetBuilder
Adds request-local measured node sizes.
Sourcepub fn build(self) -> LayoutEngineRequest
pub fn build(self) -> LayoutEngineRequest
Builds a layout engine request.
Trait Implementations§
Source§impl Clone for LayoutPresetBuilder
impl Clone for LayoutPresetBuilder
Source§fn clone(&self) -> LayoutPresetBuilder
fn clone(&self) -> LayoutPresetBuilder
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LayoutPresetBuilder
impl Debug for LayoutPresetBuilder
Source§impl Default for LayoutPresetBuilder
impl Default for LayoutPresetBuilder
Source§fn default() -> LayoutPresetBuilder
fn default() -> LayoutPresetBuilder
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for LayoutPresetBuilder
impl<'de> Deserialize<'de> for LayoutPresetBuilder
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<LayoutPresetBuilder, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<LayoutPresetBuilder, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<LayoutPresetBuilder> for LayoutEngineRequest
impl From<LayoutPresetBuilder> for LayoutEngineRequest
Source§fn from(value: LayoutPresetBuilder) -> LayoutEngineRequest
fn from(value: LayoutPresetBuilder) -> LayoutEngineRequest
Converts to this type from the input type.
Source§impl PartialEq for LayoutPresetBuilder
impl PartialEq for LayoutPresetBuilder
Source§fn eq(&self, other: &LayoutPresetBuilder) -> bool
fn eq(&self, other: &LayoutPresetBuilder) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for LayoutPresetBuilder
impl Serialize for LayoutPresetBuilder
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for LayoutPresetBuilder
Auto Trait Implementations§
impl Freeze for LayoutPresetBuilder
impl RefUnwindSafe for LayoutPresetBuilder
impl Send for LayoutPresetBuilder
impl Sync for LayoutPresetBuilder
impl Unpin for LayoutPresetBuilder
impl UnsafeUnpin for LayoutPresetBuilder
impl UnwindSafe for LayoutPresetBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more