use super::{Backlog, PollBudget, RunAffinity, Scratch, Shares, Sink};
impl Backlog {
#[must_use]
pub fn with_affinity(self, affinity: RunAffinity) -> Backlog {
Backlog { affinity, ..self }
}
#[must_use]
pub fn new() -> Backlog {
Backlog::default()
}
#[must_use]
pub fn with_window(window: PollBudget) -> Backlog {
Backlog {
table: std::sync::Arc::default(),
scratch: Scratch::open(),
window,
sink: None,
shares: Shares::Unset,
affinity: RunAffinity::Os,
}
}
#[must_use]
pub fn with_sink(self, sink: Sink) -> Backlog {
Backlog {
sink: Some(sink),
..self
}
}
}