pub enum GraphEvent<N, P, C>{
NodesMoved {
nodes: Vec<(N, Position)>,
},
NodeResized {
id: N,
size: Size,
},
ConnectionRequested {
source: P,
target: P,
},
ConnectionRemoved {
id: C,
},
SelectionChanged {
nodes: HashSet<N>,
connections: HashSet<C>,
},
NodesDeleted {
ids: Vec<N>,
},
NodesCopied {
ids: Vec<N>,
},
NodesPasted {
offset: Position,
},
Undo,
Redo,
GroupCreated {
node_ids: Vec<N>,
},
CreateNode {
item_id: String,
position: Position,
connect_from: Option<P>,
connect_to: Option<String>,
connect_direction: Option<PortDirection>,
},
}Variants§
NodesMoved
Final positions for every node moved by one drag gesture.
NodeResized
ConnectionRequested
ConnectionRemoved
Fields
§
id: CSelectionChanged
NodesDeleted
NodesCopied
NodesPasted
Undo
Redo
GroupCreated
CreateNode
User selected a node type from the creation menu.
Consumer should create the node, and if connect_from/connect_to are set,
also create a connection between them.
Fields
§
connect_from: Option<P>The port that initiated the draft connection (if menu was opened during a drag).
§
connect_to: Option<String>The port id on the new node to connect to (e.g. “a”, “result”). Consumer prefixes this with the new node’s id.
§
connect_direction: Option<PortDirection>Direction of the draft origin, so consumer knows output→input order.
Trait Implementations§
Source§impl<N, P, C> Clone for GraphEvent<N, P, C>
impl<N, P, C> Clone for GraphEvent<N, P, C>
Source§fn clone(&self) -> GraphEvent<N, P, C>
fn clone(&self) -> GraphEvent<N, P, C>
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<N, P, C> Freeze for GraphEvent<N, P, C>
impl<N, P, C> RefUnwindSafe for GraphEvent<N, P, C>where
Vec<(N, Position)>: RefUnwindSafe,
N: RefUnwindSafe,
P: RefUnwindSafe,
C: RefUnwindSafe,
HashSet<N>: RefUnwindSafe,
HashSet<C>: RefUnwindSafe,
Vec<N>: RefUnwindSafe,
Option<P>: RefUnwindSafe,
impl<N, P, C> Send for GraphEvent<N, P, C>
impl<N, P, C> Sync for GraphEvent<N, P, C>
impl<N, P, C> Unpin for GraphEvent<N, P, C>
impl<N, P, C> UnsafeUnpin for GraphEvent<N, P, C>where
Vec<(N, Position)>: UnsafeUnpin,
N: UnsafeUnpin,
P: UnsafeUnpin,
C: UnsafeUnpin,
HashSet<N>: UnsafeUnpin,
HashSet<C>: UnsafeUnpin,
Vec<N>: UnsafeUnpin,
Option<P>: UnsafeUnpin,
impl<N, P, C> UnwindSafe for GraphEvent<N, P, C>where
Vec<(N, Position)>: UnwindSafe,
N: UnwindSafe,
P: UnwindSafe,
C: UnwindSafe,
HashSet<N>: UnwindSafe,
HashSet<C>: UnwindSafe,
Vec<N>: UnwindSafe,
Option<P>: UnwindSafe,
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§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<El, T, Marker> IntoElementMaybeSignal<T, Marker> for Elwhere
El: IntoElementMaybeSignalType<T, Marker>,
impl<El, T, Marker> IntoElementMaybeSignal<T, Marker> for Elwhere
El: IntoElementMaybeSignalType<T, Marker>,
fn into_element_maybe_signal(self) -> ElementMaybeSignal<T>
Source§impl<T, Js> IntoElementMaybeSignalType<T, Element> for Js
impl<T, Js> IntoElementMaybeSignalType<T, Element> for Js
fn into_element_maybe_signal_type(self) -> ElementMaybeSignalType<T>
Source§impl<El, T, Marker> IntoElementsMaybeSignal<T, Marker> for Elwhere
El: IntoElementsMaybeSignalType<T, Marker>,
impl<El, T, Marker> IntoElementsMaybeSignal<T, Marker> for Elwhere
El: IntoElementsMaybeSignalType<T, Marker>,
fn into_elements_maybe_signal(self) -> ElementsMaybeSignal<T>
Source§impl<T, Js> IntoElementsMaybeSignalType<T, Element> for Js
impl<T, Js> IntoElementsMaybeSignalType<T, Element> for Js
fn into_elements_maybe_signal_type(self) -> ElementsMaybeSignalType<T>
Source§impl<T> SerializableKey for T
impl<T> SerializableKey for T
Source§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.