pub struct Node<T>{
pub id: Uuid,
pub index: usize,
pub value: Ops<T>,
pub collection_type: Option<CollectionType>,
pub enabled: bool,
pub node_type: NodeType,
pub direction: Direction,
pub incoming: HashSet<usize>,
pub outgoing: HashSet<usize>,
}Fields§
§id: Uuid§index: usize§value: Ops<T>§collection_type: Option<CollectionType>§enabled: bool§node_type: NodeType§direction: Direction§incoming: HashSet<usize>§outgoing: HashSet<usize>Implementations§
Source§impl<T> Node<T>
impl<T> Node<T>
pub fn new(index: usize, node_type: NodeType, value: Ops<T>) -> Self
pub fn node_type(&self) -> &NodeType
pub fn value(&self) -> &Ops<T>
pub fn is_recurrent(&self) -> bool
pub fn incoming(&self) -> &HashSet<usize>
pub fn outgoing(&self) -> &HashSet<usize>
pub fn incoming_mut(&mut self) -> &mut HashSet<usize>
pub fn outgoing_mut(&mut self) -> &mut HashSet<usize>
Trait Implementations§
Source§impl<T> Gene for Node<T>
impl<T> Gene for Node<T>
type Allele = Ops<T>
Source§fn allele(&self) -> &Ops<T>
fn allele(&self) -> &Ops<T>
Get the
allele of the Gene. This is the value that the Gene represents or “expresses”.Source§fn new_instance(&self) -> Node<T>
fn new_instance(&self) -> Node<T>
Create a new instance of the
Gene.Source§fn with_allele(&self, allele: &Ops<T>) -> Node<T>
fn with_allele(&self, allele: &Ops<T>) -> Node<T>
Create a new
Gene with the given allele.Auto Trait Implementations§
impl<T> Freeze for Node<T>where
T: Freeze,
impl<T> !RefUnwindSafe for Node<T>
impl<T> !Send for Node<T>
impl<T> !Sync for Node<T>
impl<T> Unpin for Node<T>where
T: Unpin,
impl<T> !UnwindSafe for Node<T>
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 more