#[non_exhaustive]pub struct InvalidScope { /* private fields */ }Available on crate feature
tower only.Expand description
A scope given to a route-level requirement (RequireScopes::try_new,
the mcp feature’s McpToolScopes::try_default/try_tool) that is not
an RFC 6749 §3.3 scope-token: empty, or holding a space, ", \, a
control or non-ASCII character. No token can carry such a scope, so the
requirement could never be met.
Scopes are configuration, not secrets: Display and
scope name the offending value.
#[non_exhaustive]: read it through its accessor.
Implementations§
Trait Implementations§
Source§impl Clone for InvalidScope
impl Clone for InvalidScope
Source§impl Debug for InvalidScope
impl Debug for InvalidScope
Source§impl Display for InvalidScope
impl Display for InvalidScope
impl Eq for InvalidScope
Source§impl Error for InvalidScope
impl Error for InvalidScope
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<InvalidScope> for McpScopesError
Available on crate feature mcp only.
impl From<InvalidScope> for McpScopesError
Available on crate feature
mcp only.Source§fn from(source: InvalidScope) -> Self
fn from(source: InvalidScope) -> Self
Converts to this type from the input type.
Source§impl PartialEq for InvalidScope
impl PartialEq for InvalidScope
impl StructuralPartialEq for InvalidScope
Auto Trait Implementations§
impl Freeze for InvalidScope
impl RefUnwindSafe for InvalidScope
impl Send for InvalidScope
impl Sync for InvalidScope
impl Unpin for InvalidScope
impl UnsafeUnpin for InvalidScope
impl UnwindSafe for InvalidScope
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