#[non_exhaustive]pub enum ProtectedResourceMetadataError {
InvalidResourceUrl(ParseError),
UnsupportedResourceScheme(String),
ResourceHasFragment,
MissingAuthorizationServer,
InvalidAuthorizationServerUrl {
url: String,
source: ParseError,
},
UnsupportedAuthorizationServerScheme(String),
}Expand description
Errors returned when validating MCP Protected Resource Metadata.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
InvalidResourceUrl(ParseError)
The resource identifier is not a valid absolute URL.
UnsupportedResourceScheme(String)
MCP HTTP resource identifiers must use HTTP or HTTPS.
ResourceHasFragment
Resource identifiers cannot contain URL fragments.
MissingAuthorizationServer
MCP Protected Resource Metadata must advertise an authorization server.
InvalidAuthorizationServerUrl
An advertised authorization-server issuer is not a valid absolute URL.
UnsupportedAuthorizationServerScheme(String)
An advertised authorization-server issuer does not use HTTP(S).
Trait Implementations§
Source§impl Error for ProtectedResourceMetadataError
impl Error for ProtectedResourceMetadataError
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()
Auto Trait Implementations§
impl Freeze for ProtectedResourceMetadataError
impl RefUnwindSafe for ProtectedResourceMetadataError
impl Send for ProtectedResourceMetadataError
impl Sync for ProtectedResourceMetadataError
impl Unpin for ProtectedResourceMetadataError
impl UnsafeUnpin for ProtectedResourceMetadataError
impl UnwindSafe for ProtectedResourceMetadataError
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