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]
&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>
[src]
&mut self,
obj: &Self::Id,
owned: bool
) -> Result<(Self, Vec<Self::Id>), FlowError>
moves all the nodes under the designated node out of the current flow and unmounts them
Err if:
- Obj not found.
- 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:
- 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:
- Obj not found.
Provided methods
fn dock_unordered(
&mut self,
owner: &Self::Id,
flow: Self
) -> Result<(), FlowError>
[src]
&mut self,
owner: &Self::Id,
flow: Self
) -> Result<(), FlowError>
adds all the nodes in another flow to self and mounts all orphan nodes to the designated node
Err if:
- Owner not found.
- 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]
&mut self,
obj: &Self::Id
) -> Result<(Self, Vec<Self::Id>), FlowError>
Implementors
impl<Id, FlowNode> FlowDock for FlowArena<Id, FlowNode> where
Id: Clone + Hash + Eq + Default + Debug,
FlowNode: Node<Id> + Default + Debug + Clone,
[src]
impl<Id, FlowNode> FlowDock for FlowArena<Id, FlowNode> where
Id: Clone + Hash + Eq + Default + Debug,
FlowNode: Node<Id> + Default + Debug + Clone,
[src]fn dock(
&mut self,
owner: &Self::Id,
vec: Vec<Self::Id>,
flow: Self
) -> Result<(), FlowError>
[src]
&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>
[src]
&mut self,
obj: &Self::Id,
owned: bool
) -> Result<(Self, Vec<Self::Id>), FlowError>