pub struct LayoutOptions {
pub direction: LayoutDirection,
pub spacing: LayoutSpacing,
pub margin: CanvasSize,
pub default_node_size: CanvasSize,
pub node_origin: (f32, f32),
}Expand description
Options shared by Jellyflow layout adapters.
Fields§
§direction: LayoutDirection§spacing: LayoutSpacing§margin: CanvasSize§default_node_size: CanvasSize§node_origin: (f32, f32)Fallback node origin used when a node has no per-node origin override.
Implementations§
Source§impl LayoutOptions
impl LayoutOptions
Sourcepub fn with_default_node_size(self, size: CanvasSize) -> Self
pub fn with_default_node_size(self, size: CanvasSize) -> Self
Uses a different fallback node size for nodes without explicit or measured size.
Sourcepub fn with_direction(self, direction: LayoutDirection) -> Self
pub fn with_direction(self, direction: LayoutDirection) -> Self
Uses a different layered layout direction.
Sourcepub fn with_node_origin(self, node_origin: (f32, f32)) -> Self
pub fn with_node_origin(self, node_origin: (f32, f32)) -> Self
Uses a different fallback node origin.
Trait Implementations§
Source§impl Clone for LayoutOptions
impl Clone for LayoutOptions
Source§fn clone(&self) -> LayoutOptions
fn clone(&self) -> LayoutOptions
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 moreimpl Copy for LayoutOptions
Source§impl Debug for LayoutOptions
impl Debug for LayoutOptions
Source§impl Default for LayoutOptions
impl Default for LayoutOptions
Source§impl<'de> Deserialize<'de> for LayoutOptions
impl<'de> Deserialize<'de> for LayoutOptions
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for LayoutOptions
impl PartialEq for LayoutOptions
Source§fn eq(&self, other: &LayoutOptions) -> bool
fn eq(&self, other: &LayoutOptions) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for LayoutOptions
impl Serialize for LayoutOptions
impl StructuralPartialEq for LayoutOptions
Auto Trait Implementations§
impl Freeze for LayoutOptions
impl RefUnwindSafe for LayoutOptions
impl Send for LayoutOptions
impl Sync for LayoutOptions
impl Unpin for LayoutOptions
impl UnsafeUnpin for LayoutOptions
impl UnwindSafe for LayoutOptions
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