pub enum PolicyOutput<Guard, Error> {
Ready(Guard),
Abort(Error),
Retry,
}
Available on crate feature
limit
only.Expand description
The output of a limit policy.
Variants§
Ready(Guard)
The request is allowed to proceed, and the guard is returned to release the limit when it is dropped, which should be done after the request is completed.
Abort(Error)
The request is not allowed to proceed, and should be aborted.
Retry
The request is not allowed to proceed, but should be retried.
Trait Implementations§
Auto Trait Implementations§
impl<Guard, Error> Freeze for PolicyOutput<Guard, Error>
impl<Guard, Error> RefUnwindSafe for PolicyOutput<Guard, Error>where
Guard: RefUnwindSafe,
Error: RefUnwindSafe,
impl<Guard, Error> Send for PolicyOutput<Guard, Error>
impl<Guard, Error> Sync for PolicyOutput<Guard, Error>
impl<Guard, Error> Unpin for PolicyOutput<Guard, Error>
impl<Guard, Error> UnwindSafe for PolicyOutput<Guard, Error>where
Guard: UnwindSafe,
Error: UnwindSafe,
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