pub struct NodeCollectionBuilder<'a, C, T>{
pub factory: Option<&'a NodeFactory<T>>,
pub nodes: BTreeMap<&'a Uuid, &'a Node<T>>,
pub node_order: BTreeMap<usize, &'a Uuid>,
pub relationships: Vec<Relationship<'a>>,
pub removed: HashSet<&'a Uuid>,
/* private fields */
}Fields§
§factory: Option<&'a NodeFactory<T>>§nodes: BTreeMap<&'a Uuid, &'a Node<T>>§node_order: BTreeMap<usize, &'a Uuid>§relationships: Vec<Relationship<'a>>§removed: HashSet<&'a Uuid>Implementations§
Source§impl<'a, C, T> NodeCollectionBuilder<'a, C, T>
impl<'a, C, T> NodeCollectionBuilder<'a, C, T>
pub fn new(factory: &'a NodeFactory<T>) -> Self
pub fn one_to_one(self, one: &'a C, two: &'a C) -> Self
pub fn one_to_many(self, one: &'a C, two: &'a C) -> Self
pub fn many_to_one(self, one: &'a C, two: &'a C) -> Self
pub fn all_to_all(self, one: &'a C, two: &'a C) -> Self
pub fn one_to_one_self(self, one: &'a C, two: &'a C) -> Self
pub fn parent_to_child(self, one: &'a C, two: &'a C) -> Self
pub fn replace(self, one: &'a C, two: &'a C) -> Self
pub fn insert(self, collection: &'a C) -> Self
pub fn build(self) -> C
pub fn layer(&self, collections: Vec<&'a C>) -> Self
pub fn connect(&mut self, connection: ConnectTypes, one: &'a C, two: &'a C)
pub fn attach(&mut self, group: &'a [Node<T>])
Trait Implementations§
Source§impl<'a, C, T> Default for NodeCollectionBuilder<'a, C, T>
impl<'a, C, T> Default for NodeCollectionBuilder<'a, C, T>
Source§fn default() -> NodeCollectionBuilder<'a, C, T>
fn default() -> NodeCollectionBuilder<'a, C, T>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a, C, T> Freeze for NodeCollectionBuilder<'a, C, T>
impl<'a, C, T> !RefUnwindSafe for NodeCollectionBuilder<'a, C, T>
impl<'a, C, T> !Send for NodeCollectionBuilder<'a, C, T>
impl<'a, C, T> !Sync for NodeCollectionBuilder<'a, C, T>
impl<'a, C, T> Unpin for NodeCollectionBuilder<'a, C, T>where
C: Unpin,
impl<'a, C, T> !UnwindSafe for NodeCollectionBuilder<'a, C, 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> 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