usethiserror::Error;/// Returned when a string does not match any known capability variant.
#[derive(Debug, Clone, Error)]#[error("unknown capability: {name}")]pubstructParseCapabilityError{name:Box<str>,
}implParseCapabilityError{/// Wrap the unrecognized name for display in the error message.
pubfnnew(name:&str)->Self{Self{
name:Box::from(name),}}}