use super::{Placement, PlacementSet};
use crate::op::OpId;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct PlacementRecord {
pub op: OpId,
pub alternatives: PlacementSet,
pub leader: Option<OpId>,
pub chosen: Placement,
}
impl PlacementRecord {
#[must_use]
pub const fn new(op: OpId, alternatives: PlacementSet, leader: Option<OpId>) -> Self {
Self {
op,
alternatives,
leader,
chosen: Placement::Inline,
}
}
#[must_use]
pub const fn with_chosen(mut self, chosen: Placement) -> Self {
self.chosen = chosen;
self
}
}