Struct biodivine_sketchbook::sketchbook::layout::LayoutNode
source · pub struct LayoutNode {
position: NodePosition,
}
Expand description
A node for a particular Variable
’s in a particular Layout
. This structure only
holds information about the node itself, the id of the variable and layout is held
elsewhere (see super::Layout or crate::sketchbook::model::ModelState).
Currently, only the position is stored.
Fields§
§position: NodePosition
Implementations§
source§impl LayoutNode
impl LayoutNode
sourcepub fn new(px: f32, py: f32) -> LayoutNode
pub fn new(px: f32, py: f32) -> LayoutNode
Create new LayoutNode
of the regulatory graph.
sourcepub fn get_position(&self) -> &NodePosition
pub fn get_position(&self) -> &NodePosition
Get the pair of coordinates.
source§impl LayoutNode
impl LayoutNode
Methods for changing node’s layout data.
sourcepub fn change_position(&mut self, new_px: f32, new_py: f32)
pub fn change_position(&mut self, new_px: f32, new_py: f32)
Change node’s coordinates.
Trait Implementations§
source§impl Clone for LayoutNode
impl Clone for LayoutNode
source§fn clone(&self) -> LayoutNode
fn clone(&self) -> LayoutNode
Returns a copy of the value. Read more
1.0.0 · 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 LayoutNode
impl Debug for LayoutNode
source§impl Default for LayoutNode
impl Default for LayoutNode
source§fn default() -> LayoutNode
fn default() -> LayoutNode
Generate new LayoutNode
at (0,0).
source§impl<'de> Deserialize<'de> for LayoutNode
impl<'de> Deserialize<'de> for LayoutNode
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 Display for LayoutNode
impl Display for LayoutNode
source§impl PartialEq for LayoutNode
impl PartialEq for LayoutNode
source§impl Serialize for LayoutNode
impl Serialize for LayoutNode
impl StructuralPartialEq for LayoutNode
Auto Trait Implementations§
impl Freeze for LayoutNode
impl RefUnwindSafe for LayoutNode
impl Send for LayoutNode
impl Sync for LayoutNode
impl Unpin for LayoutNode
impl UnwindSafe for LayoutNode
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)