pub struct LayoutResult {
pub nodes: Vec<LayoutNodePosition>,
pub edge_routes: Vec<LayoutEdgeRoute>,
pub bounds: Option<CanvasRect>,
}Expand description
Result of a headless layout run.
Fields§
§nodes: Vec<LayoutNodePosition>Engine-produced results contain at most one entry per node. If a caller manually constructs a result with duplicates, lookup returns the first entry and transaction conversion fails.
edge_routes: Vec<LayoutEdgeRoute>§bounds: Option<CanvasRect>Implementations§
Source§impl LayoutResult
impl LayoutResult
Sourcepub fn node_position(&self, node: NodeId) -> Option<LayoutNodePosition>
pub fn node_position(&self, node: NodeId) -> Option<LayoutNodePosition>
Finds one node position in this result.
Sourcepub fn to_transaction(
&self,
graph: &Graph,
) -> Result<GraphTransaction, LayoutError>
pub fn to_transaction( &self, graph: &Graph, ) -> Result<GraphTransaction, LayoutError>
Converts node position changes into a Jellyflow transaction.
Trait Implementations§
Source§impl Clone for LayoutResult
impl Clone for LayoutResult
Source§fn clone(&self) -> LayoutResult
fn clone(&self) -> LayoutResult
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 LayoutResult
impl Debug for LayoutResult
Source§impl<'de> Deserialize<'de> for LayoutResult
impl<'de> Deserialize<'de> for LayoutResult
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<LayoutResult, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<LayoutResult, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for LayoutResult
impl PartialEq for LayoutResult
Source§fn eq(&self, other: &LayoutResult) -> bool
fn eq(&self, other: &LayoutResult) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for LayoutResult
impl Serialize for LayoutResult
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 LayoutResult
Auto Trait Implementations§
impl Freeze for LayoutResult
impl RefUnwindSafe for LayoutResult
impl Send for LayoutResult
impl Sync for LayoutResult
impl Unpin for LayoutResult
impl UnsafeUnpin for LayoutResult
impl UnwindSafe for LayoutResult
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