Trait flow_arena::FlowDock[][src]

pub trait FlowDock: FlowDevote + FlowCheck + Sized {
    fn dock(
        &mut self,
        owner: &Self::Id,
        vec: Vec<Self::Id>,
        flow: Self
    ) -> Result<(), FlowError>;
fn undock_impl(
        &mut self,
        obj: &Self::Id,
        owned: bool
    ) -> Result<(Self, Vec<Self::Id>), FlowError>;
fn snap(&self, obj: &Self::Id) -> Result<(Self, Vec<Self::Id>), FlowError>;
fn snap_owned(
        &self,
        obj: &Self::Id
    ) -> Result<(Self, Vec<Self::Id>), FlowError>; fn dock_unordered(
        &mut self,
        owner: &Self::Id,
        flow: Self
    ) -> Result<(), FlowError> { ... }
fn undock(
        &mut self,
        obj: &Self::Id
    ) -> Result<(Self, Vec<Self::Id>), FlowError> { ... }
fn undock_owned(
        &mut self,
        obj: &Self::Id
    ) -> Result<(Self, Vec<Self::Id>), FlowError> { ... } }

provides ability to cut (undock) and copy (snap) a flow from a node and paste it to another node (dock)

Required methods

fn dock(
    &mut self,
    owner: &Self::Id,
    vec: Vec<Self::Id>,
    flow: Self
) -> Result<(), FlowError>
[src]

fn undock_impl(
    &mut self,
    obj: &Self::Id,
    owned: bool
) -> Result<(Self, Vec<Self::Id>), FlowError>
[src]

moves all the nodes under the designated node out of the current flow and unmounts them

Err if:

  1. Obj not found.
  2. Node linked by other nodes.

fn snap(&self, obj: &Self::Id) -> Result<(Self, Vec<Self::Id>), FlowError>[src]

clones all the nodes linked under the designated node and unmounts the clone

Err if:

  1. Obj not found.

fn snap_owned(&self, obj: &Self::Id) -> Result<(Self, Vec<Self::Id>), FlowError>[src]

clones all the nodes owned under the designated node and unmounts the clone

Err if:

  1. Obj not found.
Loading content...

Provided methods

fn dock_unordered(
    &mut self,
    owner: &Self::Id,
    flow: Self
) -> Result<(), FlowError>
[src]

adds all the nodes in another flow to self and mounts all orphan nodes to the designated node

Err if:

  1. Owner not found.
  2. Node exists in current flow.

fn undock(&mut self, obj: &Self::Id) -> Result<(Self, Vec<Self::Id>), FlowError>[src]

fn undock_owned(
    &mut self,
    obj: &Self::Id
) -> Result<(Self, Vec<Self::Id>), FlowError>
[src]

Loading content...

Implementors

impl<Id, FlowNode> FlowDock for FlowArena<Id, FlowNode> where
    Id: Clone + Hash + Eq + Default + Debug,
    FlowNode: Node<Id> + Default + Debug + Clone
[src]

Loading content...