pub struct ReplicationPlanner;Expand description
Simple range/visibility-based replication planner.
Implementations§
Source§impl ReplicationPlanner
impl ReplicationPlanner
Sourcepub fn plan_for_viewer<F: VisibilityFilter>(
station: &Station,
index: &CellIndex,
policies: &PolicyTable,
viewer: &ViewerQuery,
filter: &F,
budget: ReplicationBudget,
) -> ReplicationPlan
pub fn plan_for_viewer<F: VisibilityFilter>( station: &Station, index: &CellIndex, policies: &PolicyTable, viewer: &ViewerQuery, filter: &F, budget: ReplicationBudget, ) -> ReplicationPlan
Plans a frame for one viewer using the station-local spatial index.
Sourcepub fn plan_for_viewer_with_scratch<F: VisibilityFilter>(
station: &Station,
index: &CellIndex,
policies: &PolicyTable,
viewer: &ViewerQuery,
filter: &F,
budget: ReplicationBudget,
scratch: &mut ReplicationScratch,
) -> ReplicationPlan
pub fn plan_for_viewer_with_scratch<F: VisibilityFilter>( station: &Station, index: &CellIndex, policies: &PolicyTable, viewer: &ViewerQuery, filter: &F, budget: ReplicationBudget, scratch: &mut ReplicationScratch, ) -> ReplicationPlan
Plans a frame using caller-provided scratch storage.
Sourcepub fn plan_for_viewer_with_scratch_into<F: VisibilityFilter>(
station: &Station,
index: &CellIndex,
policies: &PolicyTable,
viewer: &ViewerQuery,
filter: &F,
budget: ReplicationBudget,
scratch: &mut ReplicationScratch,
plan: &mut ReplicationPlan,
)
pub fn plan_for_viewer_with_scratch_into<F: VisibilityFilter>( station: &Station, index: &CellIndex, policies: &PolicyTable, viewer: &ViewerQuery, filter: &F, budget: ReplicationBudget, scratch: &mut ReplicationScratch, plan: &mut ReplicationPlan, )
Plans one viewer into caller-owned output while retaining its entity capacity.
Sourcepub fn plan_for_viewer_eligible_with_scratch_into<F, E>(
station: &Station,
index: &CellIndex,
policies: &PolicyTable,
viewer: &ViewerQuery,
filter: &F,
budget: ReplicationBudget,
eligible: E,
scratch: &mut ReplicationScratch,
plan: &mut ReplicationPlan,
)
pub fn plan_for_viewer_eligible_with_scratch_into<F, E>( station: &Station, index: &CellIndex, policies: &PolicyTable, viewer: &ViewerQuery, filter: &F, budget: ReplicationBudget, eligible: E, scratch: &mut ReplicationScratch, plan: &mut ReplicationPlan, )
Plans one viewer while applying caller-owned eligibility before budget use.
The predicate can implement dirty, per-client delivery, or gameplay-owned
selection rules without transferring that state into SectorSync.
Sourcepub fn plan_for_viewers_with_scratch<F: VisibilityFilter>(
station: &Station,
index: &CellIndex,
policies: &PolicyTable,
viewers: &[ViewerQuery],
filter: &F,
budget: ReplicationBudget,
scratch: &mut ReplicationScratch,
) -> ReplicationBatchResult
pub fn plan_for_viewers_with_scratch<F: VisibilityFilter>( station: &Station, index: &CellIndex, policies: &PolicyTable, viewers: &[ViewerQuery], filter: &F, budget: ReplicationBudget, scratch: &mut ReplicationScratch, ) -> ReplicationBatchResult
Plans viewers in input order while reusing caller-provided scratch.
Sourcepub fn plan_for_viewers_into<'a, F: VisibilityFilter>(
station: &Station,
index: &CellIndex,
policies: &PolicyTable,
viewers: &[ViewerQuery],
filter: &F,
budget: ReplicationBudget,
scratch: &mut ReplicationScratch,
batch: &'a mut ReplicationBatchScratch,
) -> ReplicationBatchView<'a>
pub fn plan_for_viewers_into<'a, F: VisibilityFilter>( station: &Station, index: &CellIndex, policies: &PolicyTable, viewers: &[ViewerQuery], filter: &F, budget: ReplicationBudget, scratch: &mut ReplicationScratch, batch: &'a mut ReplicationBatchScratch, ) -> ReplicationBatchView<'a>
Plans viewers into caller-owned output slots while retaining all capacities.
Sourcepub fn plan_for_viewers_eligible_into<'a, F, E>(
station: &Station,
index: &CellIndex,
policies: &PolicyTable,
viewers: &[ViewerQuery],
filter: &F,
budget: ReplicationBudget,
eligible: E,
scratch: &mut ReplicationScratch,
batch: &'a mut ReplicationBatchScratch,
) -> ReplicationBatchView<'a>
pub fn plan_for_viewers_eligible_into<'a, F, E>( station: &Station, index: &CellIndex, policies: &PolicyTable, viewers: &[ViewerQuery], filter: &F, budget: ReplicationBudget, eligible: E, scratch: &mut ReplicationScratch, batch: &'a mut ReplicationBatchScratch, ) -> ReplicationBatchView<'a>
Plans viewers with caller-owned eligibility and reusable output storage.
Sourcepub fn plan_for_viewer_work_bounded_with_scratch_into<F, E>(
station: &Station,
index: &CellIndex,
policies: &PolicyTable,
viewer: &ViewerQuery,
filter: &F,
budget: ReplicationBudget,
eligible: E,
scratch: &mut ReplicationScratch,
plan: &mut ReplicationPlan,
)
pub fn plan_for_viewer_work_bounded_with_scratch_into<F, E>( station: &Station, index: &CellIndex, policies: &PolicyTable, viewer: &ViewerQuery, filter: &F, budget: ReplicationBudget, eligible: E, scratch: &mut ReplicationScratch, plan: &mut ReplicationPlan, )
Plans one viewer using deterministic first-fit selection with a bounded scan.
Planning stops as soon as the budget is full. This avoids exact post-budget accounting and does not provide global priority ordering.
Sourcepub fn plan_for_viewers_work_bounded_into<'a, F, E>(
station: &Station,
index: &CellIndex,
policies: &PolicyTable,
viewers: &[ViewerQuery],
filter: &F,
budget: ReplicationBudget,
eligible: E,
scratch: &mut ReplicationScratch,
batch: &'a mut ReplicationBatchScratch,
) -> ReplicationBatchView<'a>
pub fn plan_for_viewers_work_bounded_into<'a, F, E>( station: &Station, index: &CellIndex, policies: &PolicyTable, viewers: &[ViewerQuery], filter: &F, budget: ReplicationBudget, eligible: E, scratch: &mut ReplicationScratch, batch: &'a mut ReplicationBatchScratch, ) -> ReplicationBatchView<'a>
Plans viewers using deterministic first-fit selection with bounded scans.
Each plan stops examining candidates as soon as its budget is full. This
avoids exact post-budget accounting and does not provide global priority
ordering; see ReplicationStats::unexamined_after_budget.
Sourcepub fn plan_for_viewer_range_with_scratch(
station: &Station,
index: &CellIndex,
policies: &PolicyTable,
viewer: &ViewerQuery,
budget: ReplicationBudget,
scratch: &mut ReplicationScratch,
) -> ReplicationPlan
pub fn plan_for_viewer_range_with_scratch( station: &Station, index: &CellIndex, policies: &PolicyTable, viewer: &ViewerQuery, budget: ReplicationBudget, scratch: &mut ReplicationScratch, ) -> ReplicationPlan
Plans one range-only viewer using the optional SIMD candidate filter.
With the simd feature this evaluates candidate distances in eight-lane
groups. Without it, the same API uses the scalar range-only planner.
Sourcepub fn plan_for_viewer_range_with_scratch_into(
station: &Station,
index: &CellIndex,
policies: &PolicyTable,
viewer: &ViewerQuery,
budget: ReplicationBudget,
scratch: &mut ReplicationScratch,
plan: &mut ReplicationPlan,
)
pub fn plan_for_viewer_range_with_scratch_into( station: &Station, index: &CellIndex, policies: &PolicyTable, viewer: &ViewerQuery, budget: ReplicationBudget, scratch: &mut ReplicationScratch, plan: &mut ReplicationPlan, )
Plans one range-only viewer into caller-owned reusable output.
Sourcepub fn plan_for_viewers_range_with_scratch(
station: &Station,
index: &CellIndex,
policies: &PolicyTable,
viewers: &[ViewerQuery],
budget: ReplicationBudget,
scratch: &mut ReplicationScratch,
) -> ReplicationBatchResult
pub fn plan_for_viewers_range_with_scratch( station: &Station, index: &CellIndex, policies: &PolicyTable, viewers: &[ViewerQuery], budget: ReplicationBudget, scratch: &mut ReplicationScratch, ) -> ReplicationBatchResult
Plans a range-only viewer batch in input order with optional SIMD filtering.
Sourcepub fn plan_for_viewers_range_into<'a>(
station: &Station,
index: &CellIndex,
policies: &PolicyTable,
viewers: &[ViewerQuery],
budget: ReplicationBudget,
scratch: &mut ReplicationScratch,
batch: &'a mut ReplicationBatchScratch,
) -> ReplicationBatchView<'a>
pub fn plan_for_viewers_range_into<'a>( station: &Station, index: &CellIndex, policies: &PolicyTable, viewers: &[ViewerQuery], budget: ReplicationBudget, scratch: &mut ReplicationScratch, batch: &'a mut ReplicationBatchScratch, ) -> ReplicationBatchView<'a>
Plans a range-only viewer batch into caller-owned reusable output slots.
Sourcepub fn plan_for_viewer_with_cadence<F, L>(
station: &Station,
index: &CellIndex,
policies: &PolicyTable,
viewer: &ViewerQuery,
filter: &F,
budget: ReplicationBudget,
last_sent: L,
) -> ReplicationPlan
pub fn plan_for_viewer_with_cadence<F, L>( station: &Station, index: &CellIndex, policies: &PolicyTable, viewer: &ViewerQuery, filter: &F, budget: ReplicationBudget, last_sent: L, ) -> ReplicationPlan
Plans a frame and skips entities whose distance-based cadence has not elapsed.
Sourcepub fn plan_for_viewer_with_cadence_and_scratch<F, L>(
station: &Station,
index: &CellIndex,
policies: &PolicyTable,
viewer: &ViewerQuery,
filter: &F,
budget: ReplicationBudget,
last_sent: L,
scratch: &mut ReplicationScratch,
) -> ReplicationPlan
pub fn plan_for_viewer_with_cadence_and_scratch<F, L>( station: &Station, index: &CellIndex, policies: &PolicyTable, viewer: &ViewerQuery, filter: &F, budget: ReplicationBudget, last_sent: L, scratch: &mut ReplicationScratch, ) -> ReplicationPlan
Plans a cadence-aware frame using caller-provided scratch storage.
Sourcepub fn plan_for_viewer_with_cadence_and_scratch_into<F, L>(
station: &Station,
index: &CellIndex,
policies: &PolicyTable,
viewer: &ViewerQuery,
filter: &F,
budget: ReplicationBudget,
last_sent: L,
scratch: &mut ReplicationScratch,
plan: &mut ReplicationPlan,
)
pub fn plan_for_viewer_with_cadence_and_scratch_into<F, L>( station: &Station, index: &CellIndex, policies: &PolicyTable, viewer: &ViewerQuery, filter: &F, budget: ReplicationBudget, last_sent: L, scratch: &mut ReplicationScratch, plan: &mut ReplicationPlan, )
Plans a cadence-aware frame into caller-owned reusable output.
Sourcepub fn plan_for_viewer_prioritized<F: VisibilityFilter>(
station: &Station,
index: &CellIndex,
policies: &PolicyTable,
viewer: &ViewerQuery,
filter: &F,
budget: ReplicationBudget,
) -> ReplicationPlan
pub fn plan_for_viewer_prioritized<F: VisibilityFilter>( station: &Station, index: &CellIndex, policies: &PolicyTable, viewer: &ViewerQuery, filter: &F, budget: ReplicationBudget, ) -> ReplicationPlan
Plans a frame and selects the highest-priority entities when budgeted.
Sourcepub fn plan_for_viewer_prioritized_with_scratch<F: VisibilityFilter>(
station: &Station,
index: &CellIndex,
policies: &PolicyTable,
viewer: &ViewerQuery,
filter: &F,
budget: ReplicationBudget,
scratch: &mut ReplicationScratch,
) -> ReplicationPlan
pub fn plan_for_viewer_prioritized_with_scratch<F: VisibilityFilter>( station: &Station, index: &CellIndex, policies: &PolicyTable, viewer: &ViewerQuery, filter: &F, budget: ReplicationBudget, scratch: &mut ReplicationScratch, ) -> ReplicationPlan
Plans a budgeted priority frame using caller-provided scratch storage.
Sourcepub fn plan_for_viewer_prioritized_with_scratch_into<F: VisibilityFilter>(
station: &Station,
index: &CellIndex,
policies: &PolicyTable,
viewer: &ViewerQuery,
filter: &F,
budget: ReplicationBudget,
scratch: &mut ReplicationScratch,
plan: &mut ReplicationPlan,
)
pub fn plan_for_viewer_prioritized_with_scratch_into<F: VisibilityFilter>( station: &Station, index: &CellIndex, policies: &PolicyTable, viewer: &ViewerQuery, filter: &F, budget: ReplicationBudget, scratch: &mut ReplicationScratch, plan: &mut ReplicationPlan, )
Plans a priority frame into caller-owned reusable output.
Sourcepub fn plan_for_viewer_prioritized_with_cadence<F, L>(
station: &Station,
index: &CellIndex,
policies: &PolicyTable,
viewer: &ViewerQuery,
filter: &F,
budget: ReplicationBudget,
last_sent: L,
) -> ReplicationPlan
pub fn plan_for_viewer_prioritized_with_cadence<F, L>( station: &Station, index: &CellIndex, policies: &PolicyTable, viewer: &ViewerQuery, filter: &F, budget: ReplicationBudget, last_sent: L, ) -> ReplicationPlan
Plans a budgeted priority frame with distance-based cadence checks.
Sourcepub fn plan_for_viewer_prioritized_with_cadence_and_scratch<F, L>(
station: &Station,
index: &CellIndex,
policies: &PolicyTable,
viewer: &ViewerQuery,
filter: &F,
budget: ReplicationBudget,
last_sent: L,
scratch: &mut ReplicationScratch,
) -> ReplicationPlan
pub fn plan_for_viewer_prioritized_with_cadence_and_scratch<F, L>( station: &Station, index: &CellIndex, policies: &PolicyTable, viewer: &ViewerQuery, filter: &F, budget: ReplicationBudget, last_sent: L, scratch: &mut ReplicationScratch, ) -> ReplicationPlan
Plans a priority/cadence frame using caller-provided scratch storage.
Sourcepub fn plan_for_viewer_prioritized_with_cadence_and_scratch_into<F, L>(
station: &Station,
index: &CellIndex,
policies: &PolicyTable,
viewer: &ViewerQuery,
filter: &F,
budget: ReplicationBudget,
last_sent: L,
scratch: &mut ReplicationScratch,
plan: &mut ReplicationPlan,
)
pub fn plan_for_viewer_prioritized_with_cadence_and_scratch_into<F, L>( station: &Station, index: &CellIndex, policies: &PolicyTable, viewer: &ViewerQuery, filter: &F, budget: ReplicationBudget, last_sent: L, scratch: &mut ReplicationScratch, plan: &mut ReplicationPlan, )
Plans a priority/cadence frame into caller-owned reusable output.
Trait Implementations§
Source§impl Clone for ReplicationPlanner
impl Clone for ReplicationPlanner
Source§fn clone(&self) -> ReplicationPlanner
fn clone(&self) -> ReplicationPlanner
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more