pub struct RoutingName(/* private fields */);Expand description
The name of a tool, resource or prompt.
Distinct from MethodName because the two are constrained differently: a
method name is slash-separated and its shape is a JSON-RPC convention, while
a target name is whatever the server chose to call the thing and is only
required to survive a trip through an HTTP field-value.
Implementations§
Source§impl RoutingName
impl RoutingName
Sourcepub fn new(name: &str) -> Result<Self, RoutingHeaderError>
pub fn new(name: &str) -> Result<Self, RoutingHeaderError>
A target name.
§Errors
RoutingHeaderError::EmptyName for a blank name, and
RoutingHeaderError::NonVisibleAscii naming the first byte outside
VISIBLE_ASCII_RANGE.
Trait Implementations§
Source§impl Clone for RoutingName
impl Clone for RoutingName
Source§impl Debug for RoutingName
impl Debug for RoutingName
Source§impl Display for RoutingName
impl Display for RoutingName
impl Eq for RoutingName
Source§impl Hash for RoutingName
impl Hash for RoutingName
Source§impl Ord for RoutingName
impl Ord for RoutingName
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for RoutingName
impl PartialEq for RoutingName
Source§impl PartialOrd for RoutingName
impl PartialOrd for RoutingName
impl StructuralPartialEq for RoutingName
Auto Trait Implementations§
impl Freeze for RoutingName
impl RefUnwindSafe for RoutingName
impl Send for RoutingName
impl Sync for RoutingName
impl Unpin for RoutingName
impl UnsafeUnpin for RoutingName
impl UnwindSafe for RoutingName
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