server/lib/src/admission_off.rs
//! **The door admission, switched off** (built without `admission`): every
//! request is admitted and no share is held. Only the [`Ticket`] the doors thread
//! through their reads exists, and it does nothing.
/// An admitted request with no book behind it.
pub struct Ticket;
impl Ticket {
/// Nothing is charged.
pub fn add_net_out(&self, _bytes: u64) {}
/// Nothing is charged.
pub fn add_net_in(&self, _bytes: u64) {}
/// The walk runs as is.
pub fn walk<R>(&self, f: impl FnOnce() -> R) -> R {
f()
}
}
/// No book, so no consumer is counted: the estate board says so (lane A13).
pub fn consumers() -> Option<crate::topology::ConsumerCount> {
None
}