pub struct ShardContext {
pub entity_code: String,
pub entity_seed: [u8; 32],
pub extra_journal_entries: Vec<JournalEntry>,
pub opening_balances: Vec<EntityOpeningBalance>,
}Expand description
Context for shard-mode generation.
When EnhancedOrchestrator.shard_context == None (the default), the
orchestrator behaves byte-for-byte like the pre-v5.0 single-entity
flow. When Some(ShardContext { extra_journal_entries, .. }), those
JEs are appended to Phase 4’s accumulator just before the
post-journal-entries resource check.
Fields§
§entity_code: StringThis shard’s entity code. Informational in v5.0 (the orchestrator
already carries the entity via GeneratorConfig); future phases
may use it for routing or logging.
entity_seed: [u8; 32]32-byte per-entity seed from
manifest.ownership_graph.entities[i].entity_seed. Informational
in v5.0.
extra_journal_entries: Vec<JournalEntry>IC journal entries pre-built by the shard runner before calling
EnhancedOrchestrator.generate(). Appended to the JE accumulator
at the end of phase 4.
opening_balances: Vec<EntityOpeningBalance>v5.3 — Opening-balance carryover from a prior period. When non-empty, the orchestrator’s Phase 3b (opening balances) replaces its generated openings with these carryover values for this entity, seeding period-N+1 from period-N’s closing TB instead of generating a fresh opening from the industry-mix generator.
Empty by default — engagements that don’t supply a prior period
(the v5.0–v5.2 default) see no behaviour change: the orchestrator
generates openings via OpeningBalanceGenerator as before.
Callers prepare these by reading the prior period’s per-entity
period_close/trial_balances.json and projecting onto BS-only
positions via datasynth_group::aggregate::extract_opening_balances.
Trait Implementations§
Source§impl Clone for ShardContext
impl Clone for ShardContext
Source§fn clone(&self) -> ShardContext
fn clone(&self) -> ShardContext
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ShardContext
impl Debug for ShardContext
Source§impl Default for ShardContext
impl Default for ShardContext
Source§fn default() -> ShardContext
fn default() -> ShardContext
Auto Trait Implementations§
impl Freeze for ShardContext
impl RefUnwindSafe for ShardContext
impl Send for ShardContext
impl Sync for ShardContext
impl Unpin for ShardContext
impl UnsafeUnpin for ShardContext
impl UnwindSafe for ShardContext
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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<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>
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>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
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>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
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
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.