#[non_exhaustive]pub struct Rejected<'a> {
pub status: u16,
pub endpoint: &'a str,
pub attempt: u32,
}Expand description
One rejected attempt, as the hook sees it.
Deliberately not the response itself: a streaming request’s body is not read before this decision is made, and handing over a half-consumed response would make the decision depend on which of the two paths asked for it.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.status: u16The status the server answered with — always 401 today. It is carried
rather than assumed so that a future engine which routes another status
through this hook does not have to change the hook’s shape.
endpoint: &'a strThe URL that was refused, for diagnostics.
attempt: u32Which attempt this was, counting from one.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Rejected<'a>
impl<'a> RefUnwindSafe for Rejected<'a>
impl<'a> Send for Rejected<'a>
impl<'a> Sync for Rejected<'a>
impl<'a> Unpin for Rejected<'a>
impl<'a> UnsafeUnpin for Rejected<'a>
impl<'a> UnwindSafe for Rejected<'a>
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