pub(crate) struct AcceptErrors {
last_logged: Option<Instant>,
}Expand description
The failed accepts of a listener which keeps going.
Fields§
§last_logged: Option<Instant>When the last one got logged as an error.
Implementations§
Source§impl AcceptErrors
impl AcceptErrors
Sourcepub(crate) async fn failed(&mut self, e: &Error)
pub(crate) async fn failed(&mut self, e: &Error)
Handle a failed accept. Most errors, like running out of descriptors, fail every accept until something changes, so pause instead of spinning. Only a connection which failed on its own is no reason to wait, or to tell about it beyond the debug log.
Sourcefn log_error_now(&mut self, now: Instant) -> bool
fn log_error_now(&mut self, now: Instant) -> bool
Whether an error is due to be logged as one, at most once per
ACCEPT_ERROR_INTERVAL.
Trait Implementations§
Source§impl Debug for AcceptErrors
impl Debug for AcceptErrors
Auto Trait Implementations§
impl Freeze for AcceptErrors
impl RefUnwindSafe for AcceptErrors
impl Send for AcceptErrors
impl Sync for AcceptErrors
impl Unpin for AcceptErrors
impl UnsafeUnpin for AcceptErrors
impl UnwindSafe for AcceptErrors
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].