pub struct ConnectionEditor<'a, C: AI<V, V> + Op<Output = V>, V: Clone + Default + Merge> { /* private fields */ }Expand description
allows configuring a connection to add to the graph, or manipulating an existing connection
Implementations§
Source§impl<'a, C: AI<V, V> + Op<Output = V>, V: Clone + Default + Merge> ConnectionEditor<'a, C, V>
impl<'a, C: AI<V, V> + Op<Output = V>, V: Clone + Default + Merge> ConnectionEditor<'a, C, V>
Sourcepub fn get_index(&self) -> usize
pub fn get_index(&self) -> usize
gets the index, or usize::MAX to insert at the end of the order regardless of the number of connections
Sourcepub fn insert_layer<L: Into<C>>(&mut self, layer: L) -> Option<C>
pub fn insert_layer<L: Into<C>>(&mut self, layer: L) -> Option<C>
adds a layer to the associated graph if there is one, returning the layer if not or the previous layer associated with the layer id
Sourcepub fn with<L: Into<C>>(self, layer: L) -> Self
pub fn with<L: Into<C>>(self, layer: L) -> Self
inserts the layer into the graph using the current layer id
Sourcepub fn with_clear(self, clear: bool) -> Self
pub fn with_clear(self, clear: bool) -> Self
sets the flag for whether the input should be cleared after use
Sourcepub fn with_index(self, index: usize) -> Self
pub fn with_index(self, index: usize) -> Self
sets the index to insert in the run order, or usize::MAX to insert at the end of the order regardless of the number of connections
Sourcepub fn with_input<L: Into<Label>>(self, label: L) -> Self
pub fn with_input<L: Into<Label>>(self, label: L) -> Self
sets the input label
Sourcepub fn with_label<L: Into<Label>>(self, label: L) -> Self
pub fn with_label<L: Into<Label>>(self, label: L) -> Self
sets the connection label
Sourcepub fn with_layer<L: Into<Label>>(self, label: L) -> Self
pub fn with_layer<L: Into<Label>>(self, label: L) -> Self
sets the layer label
Sourcepub fn with_output<L: Into<Label>>(self, label: L) -> Self
pub fn with_output<L: Into<Label>>(self, label: L) -> Self
sets the output label
Trait Implementations§
Source§impl<'a, C: Debug + AI<V, V> + Op<Output = V>, V: Debug + Clone + Default + Merge> Debug for ConnectionEditor<'a, C, V>
impl<'a, C: Debug + AI<V, V> + Op<Output = V>, V: Debug + Clone + Default + Merge> Debug for ConnectionEditor<'a, C, V>
Auto Trait Implementations§
impl<'a, C, V> Freeze for ConnectionEditor<'a, C, V>
impl<'a, C, V> RefUnwindSafe for ConnectionEditor<'a, C, V>where
C: RefUnwindSafe,
impl<'a, C, V> Send for ConnectionEditor<'a, C, V>where
C: Send,
impl<'a, C, V> Sync for ConnectionEditor<'a, C, V>where
C: Sync,
impl<'a, C, V> Unpin for ConnectionEditor<'a, C, V>
impl<'a, C, V> !UnwindSafe for ConnectionEditor<'a, C, V>
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> 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 more