pub enum ExternalNamePolicy {
McpTool,
OpenAiTool,
FileSafe,
HumanReadable,
}Expand description
Policy selecting how a kernel Symbol is mangled into a surface-specific
external name.
Each variant fails closed toward the character set its surface accepts; none of them is reversible, so they are used for naming only, never for routing.
Variants§
McpTool
MCP tool name: keep [A-Za-z0-9_-], replace everything else (including
/ and .) with a single _ per character. No run-collapsing, no trim.
OpenAiTool
OpenAI tool name: keep ascii-alphanumeric characters; collapse any run of
non-alphanumeric characters to a single _; then trim leading/trailing
_. May return an empty string (callers supply their own fallback).
FileSafe
File-safe name: keep ascii-alphanumeric and -, _, .; replace every
other character with _ per character. No run-collapsing, no trim.
HumanReadable
Human-readable name: the qualified symbol string unchanged.
Trait Implementations§
Source§impl Clone for ExternalNamePolicy
impl Clone for ExternalNamePolicy
Source§fn clone(&self) -> ExternalNamePolicy
fn clone(&self) -> ExternalNamePolicy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ExternalNamePolicy
Source§impl Debug for ExternalNamePolicy
impl Debug for ExternalNamePolicy
impl Eq for ExternalNamePolicy
Source§impl PartialEq for ExternalNamePolicy
impl PartialEq for ExternalNamePolicy
Source§fn eq(&self, other: &ExternalNamePolicy) -> bool
fn eq(&self, other: &ExternalNamePolicy) -> bool
self and other values to be equal, and is used by ==.