#[non_exhaustive]pub enum McpAppError {
InvalidUiUri(String),
InvalidHtmlDocument,
InvalidCspOrigin {
origin: String,
directive: &'static str,
},
InvalidDomain(String),
InvalidVisibility,
EmptyField(&'static str),
Metadata(MetaValidationError),
Serialization(Error),
}Expand description
A validation or construction error from the typed MCP Apps API.
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.
InvalidUiUri(String)
The resource URI did not satisfy the MCP Apps ui:// requirement.
InvalidHtmlDocument
The resource body did not look like a complete HTML5 document.
InvalidCspOrigin
A CSP source was not a permitted origin.
Fields
InvalidDomain(String)
A dedicated sandbox domain was malformed.
InvalidVisibility
Tool visibility was empty or contained duplicate entries.
EmptyField(&'static str)
A required human-readable value was empty.
Metadata(MetaValidationError)
Protocol metadata failed the core _meta grammar.
Serialization(Error)
Typed metadata could not be converted to JSON.
Trait Implementations§
Source§impl Debug for McpAppError
impl Debug for McpAppError
Source§impl Display for McpAppError
impl Display for McpAppError
Source§impl Error for McpAppError
impl Error for McpAppError
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<Error> for McpAppError
impl From<Error> for McpAppError
Source§impl From<MetaValidationError> for McpAppError
impl From<MetaValidationError> for McpAppError
Source§fn from(source: MetaValidationError) -> Self
fn from(source: MetaValidationError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for McpAppError
impl !UnwindSafe for McpAppError
impl Freeze for McpAppError
impl Send for McpAppError
impl Sync for McpAppError
impl Unpin for McpAppError
impl UnsafeUnpin for McpAppError
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