pub struct ExtensionRejection { /* private fields */ }Expand description
Rejection returned when an extension is not found.
This rejection is returned by the Extension extractor when the
requested type is not present in the router’s extensions.
§Example
use tower_mcp::extract::ExtensionRejection;
let rejection = ExtensionRejection::not_found::<String>();
assert!(rejection.type_name().contains("String"));Implementations§
Trait Implementations§
Source§impl Clone for ExtensionRejection
impl Clone for ExtensionRejection
Source§fn clone(&self) -> ExtensionRejection
fn clone(&self) -> ExtensionRejection
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ExtensionRejection
impl Debug for ExtensionRejection
Source§impl Display for ExtensionRejection
impl Display for ExtensionRejection
Source§impl Error for ExtensionRejection
impl Error for ExtensionRejection
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<ExtensionRejection> for Error
impl From<ExtensionRejection> for Error
Source§fn from(rejection: ExtensionRejection) -> Self
fn from(rejection: ExtensionRejection) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ExtensionRejection
impl RefUnwindSafe for ExtensionRejection
impl Send for ExtensionRejection
impl Sync for ExtensionRejection
impl Unpin for ExtensionRejection
impl UnwindSafe for ExtensionRejection
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