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 UnsafeUnpin 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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.