pub struct AlwaysAdmit;Expand description
The no-op policy: never sheds. A valid operator choice for a node that wants
no heuristic shedding. It is UNWISE under a real flood — the OS OOM-killer
becomes the only backstop — but physical limits bind regardless, and the
ConnectionLimiter task caps still apply beneath it, so the choice stays
available.
Trait Implementations§
Source§impl Clone for AlwaysAdmit
impl Clone for AlwaysAdmit
impl Copy for AlwaysAdmit
Source§impl Debug for AlwaysAdmit
impl Debug for AlwaysAdmit
Source§impl Default for AlwaysAdmit
impl Default for AlwaysAdmit
Source§impl LoadShedPolicy for AlwaysAdmit
impl LoadShedPolicy for AlwaysAdmit
Source§fn decide(&self, _class: RequestClass, _snap: &PressureSnapshot) -> ShedDecision
fn decide(&self, _class: RequestClass, _snap: &PressureSnapshot) -> ShedDecision
Judge one request against a single pressure sample.
Source§fn pressure_active(&self) -> bool
fn pressure_active(&self) -> bool
Whether the policy currently considers the node pressured. Drives the
load_shed_pressure_active gauge; defaults to false for policies with
no pressure notion (e.g. AlwaysAdmit).Auto Trait Implementations§
impl Freeze for AlwaysAdmit
impl RefUnwindSafe for AlwaysAdmit
impl Send for AlwaysAdmit
impl Sync for AlwaysAdmit
impl Unpin for AlwaysAdmit
impl UnsafeUnpin for AlwaysAdmit
impl UnwindSafe for AlwaysAdmit
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::RequestCreates a shared type from an unshared type.