pub struct ReloadHandle(/* private fields */);Expand description
The handle a signal handler (or a future admin route) triggers reloads with.
Implementations§
Source§impl ReloadHandle
impl ReloadHandle
Sourcepub fn trigger(&self) -> bool
pub fn trigger(&self) -> bool
Asks for a reload, without waiting for the outcome.
try_send on a capacity-one channel, so a signal storm coalesces into
one reload rather than queueing a run of identical ones. A refusal here
means a reload is already pending, which is the same answer.
Sourcepub async fn reload(&self) -> Result<ReloadReport, ReloadError>
pub async fn reload(&self) -> Result<ReloadReport, ReloadError>
Asks for a reload and waits for what happened.
§Errors
Returns the ReloadError the reload failed with. A dropped supervisor
— the server is shutting down — surfaces as ReloadError::Load.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ReloadHandle
impl RefUnwindSafe for ReloadHandle
impl Send for ReloadHandle
impl Sync for ReloadHandle
impl Unpin for ReloadHandle
impl UnsafeUnpin for ReloadHandle
impl UnwindSafe for ReloadHandle
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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 more