pub struct InsertNodeTemplate {
pub kind: NodeKindKey,
pub kind_version: u32,
pub collapsed: bool,
pub data: Value,
pub ports: Vec<PortTemplate>,
pub input: PortKey,
pub output: PortKey,
}Expand description
A template for inserting a node between two ports.
This is the preferred UI-to-rules contract: IDs are generated by the rules layer.
Fields§
§kind: NodeKindKey§kind_version: u32§collapsed: bool§data: Value§ports: Vec<PortTemplate>§input: PortKeyWhich instantiated port should be connected from the upstream edge segment.
output: PortKeyWhich instantiated port should be connected to the downstream edge segment.
Implementations§
Source§impl InsertNodeTemplate
impl InsertNodeTemplate
Sourcepub fn instantiate(&self, at: CanvasPoint) -> Result<InsertNodeSpec, String>
pub fn instantiate(&self, at: CanvasPoint) -> Result<InsertNodeSpec, String>
Instantiates this template at a given position by allocating fresh IDs.
Trait Implementations§
Source§impl Clone for InsertNodeTemplate
impl Clone for InsertNodeTemplate
Source§fn clone(&self) -> InsertNodeTemplate
fn clone(&self) -> InsertNodeTemplate
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 moreAuto Trait Implementations§
impl Freeze for InsertNodeTemplate
impl RefUnwindSafe for InsertNodeTemplate
impl Send for InsertNodeTemplate
impl Sync for InsertNodeTemplate
impl Unpin for InsertNodeTemplate
impl UnsafeUnpin for InsertNodeTemplate
impl UnwindSafe for InsertNodeTemplate
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