pub enum ServerIdError {
InvalidFormat {
id: String,
},
}Expand description
Error returned when a candidate string fails the invariant ServerId::new enforces.
§Examples
use mcp_execution_core::{ServerId, ServerIdError};
let err = ServerId::new("../etc").unwrap_err();
assert!(matches!(err, ServerIdError::InvalidFormat { .. }));Variants§
InvalidFormat
id is not a single non-empty path segment: it is empty, or contains a .., a path
separator, or a root/prefix component.
Trait Implementations§
Source§impl Clone for ServerIdError
impl Clone for ServerIdError
Source§fn clone(&self) -> ServerIdError
fn clone(&self) -> ServerIdError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ServerIdError
impl Debug for ServerIdError
Source§impl Display for ServerIdError
impl Display for ServerIdError
impl Eq for ServerIdError
Source§impl Error for ServerIdError
impl Error for ServerIdError
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 PartialEq for ServerIdError
impl PartialEq for ServerIdError
impl StructuralPartialEq for ServerIdError
Auto Trait Implementations§
impl Freeze for ServerIdError
impl RefUnwindSafe for ServerIdError
impl Send for ServerIdError
impl Sync for ServerIdError
impl Unpin for ServerIdError
impl UnsafeUnpin for ServerIdError
impl UnwindSafe for ServerIdError
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