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) -> LayoutOptions
pub fn with_default_node_size(self, size: CanvasSize) -> LayoutOptions
Uses a different fallback node size for nodes without explicit or measured size.
Sourcepub fn with_direction(self, direction: LayoutDirection) -> LayoutOptions
pub fn with_direction(self, direction: LayoutDirection) -> LayoutOptions
Uses a different layered layout direction.
Sourcepub fn with_node_origin(self, node_origin: (f32, f32)) -> LayoutOptions
pub fn with_node_origin(self, node_origin: (f32, f32)) -> LayoutOptions
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§fn default() -> LayoutOptions
fn default() -> LayoutOptions
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for LayoutOptions
impl<'de> Deserialize<'de> for LayoutOptions
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<LayoutOptions, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<LayoutOptions, <__D as Deserializer<'de>>::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
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 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