use crate::engine::InstantMillis;
#[allow(async_fn_in_trait)]
pub trait Host {
fn now(&self) -> InstantMillis;
async fn sleep_until(&self, deadline: InstantMillis);
fn fill_entropy(&mut self, bytes: &mut [u8]);
}
pub mod airtime;
pub mod announce_pacer;
pub mod duty_gate;
pub mod grant;
pub mod interface_seam;
pub mod kernel;
pub mod reconnect;
pub mod throughput;
pub mod timers;
pub(crate) mod window_ring;
pub struct AppDeciders<P, A>
where
P: FnMut(&prns_core::routing::proof::ProofRequest) -> bool,
A: FnMut(&prns_core::routing::links::resources::ResourceOffer) -> bool,
{
pub should_prove: P,
pub should_accept_resource: A,
}
#[must_use]
pub fn decline_all() -> AppDeciders<
impl FnMut(&prns_core::routing::proof::ProofRequest) -> bool,
impl FnMut(&prns_core::routing::links::resources::ResourceOffer) -> bool,
> {
AppDeciders {
should_prove: |_| false,
should_accept_resource: |_| false,
}
}