pub(crate) enum LogDecision {
Info,
Warn,
Active,
}Expand description
Startup log level for the memory-admission “gate off” branch in main,
derived purely from the re-parsed IFC_MEM_BUDGET_MB env var (#1547).
Variants§
Info
IFC_MEM_BUDGET_MB=0: the operator opted out of the memory gate
deliberately. Not a warning-worthy condition.
Warn
The env var is unset or unparseable AND the memory gate still ended
up off, i.e. auto-detection found no readable ceiling (non-Linux
host or /proc unavailable) — a silent OOM-risk degradation.
Active
A positive budget was explicitly requested. main’s call site only
reaches memory_admission_log_level from inside the
config.mem_budget_mb == 0 branch, where this variant can never
actually occur (an explicit positive IFC_MEM_BUDGET_MB resolves
config.mem_budget_mb to that same positive value, see
mem_policy::resolve_mem_budget_mb). Kept so the function is total
over its input and independently unit-testable.
Trait Implementations§
Source§impl Clone for LogDecision
impl Clone for LogDecision
Source§fn clone(&self) -> LogDecision
fn clone(&self) -> LogDecision
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LogDecision
impl Debug for LogDecision
Source§impl PartialEq for LogDecision
impl PartialEq for LogDecision
impl Copy for LogDecision
impl Eq for LogDecision
impl StructuralPartialEq for LogDecision
Auto Trait Implementations§
impl Freeze for LogDecision
impl RefUnwindSafe for LogDecision
impl Send for LogDecision
impl Sync for LogDecision
impl Unpin for LogDecision
impl UnwindSafe for LogDecision
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read moreSource§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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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 more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.