pub enum ServerIdSlugError {
Empty,
TooLong {
len: usize,
limit: usize,
},
InvalidCharacters,
}Expand description
Errors returned by validate_server_id_slug.
Every message names the parameter as server_id (matching the MCP tool JSON field and this
crate’s other server_id-named APIs) rather than “server id” — callers surface these
messages verbatim to end users/MCP clients, so wording here must stay actionable and
consistent with every other layer that reports the same rejection.
Variants§
Empty
The candidate was empty.
TooLong
The candidate exceeded MAX_SERVER_ID_LENGTH.
Fields
§
limit: usizeMaximum allowed length (MAX_SERVER_ID_LENGTH).
InvalidCharacters
The candidate contained a character other than a lowercase ASCII letter, digit, or hyphen.
Trait Implementations§
Source§impl Clone for ServerIdSlugError
impl Clone for ServerIdSlugError
Source§fn clone(&self) -> ServerIdSlugError
fn clone(&self) -> ServerIdSlugError
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 ServerIdSlugError
impl Debug for ServerIdSlugError
Source§impl Display for ServerIdSlugError
impl Display for ServerIdSlugError
impl Eq for ServerIdSlugError
Source§impl Error for ServerIdSlugError
impl Error for ServerIdSlugError
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 ServerIdSlugError
impl PartialEq for ServerIdSlugError
impl StructuralPartialEq for ServerIdSlugError
Auto Trait Implementations§
impl Freeze for ServerIdSlugError
impl RefUnwindSafe for ServerIdSlugError
impl Send for ServerIdSlugError
impl Sync for ServerIdSlugError
impl Unpin for ServerIdSlugError
impl UnsafeUnpin for ServerIdSlugError
impl UnwindSafe for ServerIdSlugError
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