pub struct EntityGraphBuilder { /* private fields */ }Expand description
Builder for entity relationship graphs.
Implementations§
Source§impl EntityGraphBuilder
impl EntityGraphBuilder
Sourcepub fn new(config: EntityGraphConfig) -> Self
pub fn new(config: EntityGraphConfig) -> Self
Creates a new entity graph builder.
Sourcepub fn add_companies(&mut self, companies: &[Company])
pub fn add_companies(&mut self, companies: &[Company])
Adds companies to the graph.
Sourcepub fn add_ownership_relationships(
&mut self,
relationships: &[IntercompanyRelationship],
)
pub fn add_ownership_relationships( &mut self, relationships: &[IntercompanyRelationship], )
Adds ownership relationships to the graph.
Sourcepub fn add_intercompany_edge(
&mut self,
from_company: &str,
to_company: &str,
amount: Decimal,
transaction_type: &str,
)
pub fn add_intercompany_edge( &mut self, from_company: &str, to_company: &str, amount: Decimal, transaction_type: &str, )
Adds an intercompany transaction edge.
Sourcepub fn add_indirect_ownership_edges(&mut self)
pub fn add_indirect_ownership_edges(&mut self)
Adds indirect ownership edges to the graph.
Sourcepub fn company_node_map(&self) -> &HashMap<String, NodeId>
pub fn company_node_map(&self) -> &HashMap<String, NodeId>
Returns the company code to node ID mapping.
Auto Trait Implementations§
impl Freeze for EntityGraphBuilder
impl RefUnwindSafe for EntityGraphBuilder
impl Send for EntityGraphBuilder
impl Sync for EntityGraphBuilder
impl Unpin for EntityGraphBuilder
impl UnwindSafe for EntityGraphBuilder
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