#[non_exhaustive]pub enum Wire {
ChatCompletions,
Messages,
Responses,
Gemini,
Converse,
}Expand description
v1 wire dialects. Not a host registry name.
New dialects may be added in a minor release. Hosts must include a
_ arm so an additive variant is not a compile break:
use wiremux_auth::Wire;
fn host_label(wire: Wire) -> &'static str {
match wire {
Wire::ChatCompletions => "chat-completions",
Wire::Messages => "messages",
Wire::Responses => "responses",
Wire::Gemini => "gemini",
Wire::Converse => "converse",
_ => "unknown",
}
}
assert_eq!(host_label(Wire::Messages), "messages");Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
ChatCompletions
OpenAI Chat Completions.
Messages
Anthropic Messages.
Responses
OpenAI Responses.
Gemini
Google Gemini generateContent.
Converse
Amazon Bedrock Converse.
Implementations§
Source§impl Wire
impl Wire
Sourcepub const NAMES: &'static [&'static str]
pub const NAMES: &'static [&'static str]
Catalog spellings. CLI --from also accepts chat for chat-completions.
Sourcepub fn as_str(self) -> &'static str
pub fn as_str(self) -> &'static str
Catalog / file spelling (messages, chat-completions, responses, gemini, converse).
Sourcepub fn default_stream_events(self) -> &'static [&'static str]
pub fn default_stream_events(self) -> &'static [&'static str]
Built-in SSE event names when stream_events is omitted.
Sourcepub fn default_chat_path(self) -> &'static str
pub fn default_chat_path(self) -> &'static str
Dialect default chat path.
Sourcepub fn default_auth_scheme(self) -> AuthScheme
pub fn default_auth_scheme(self) -> AuthScheme
Dialect default auth scheme.
Trait Implementations§
impl Copy for Wire
Source§impl<'de> Deserialize<'de> for Wire
impl<'de> Deserialize<'de> for Wire
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Wire
impl StructuralPartialEq for Wire
Auto Trait Implementations§
impl Forget for Wire
impl Freeze for Wire
impl RefUnwindSafe for Wire
impl Send for Wire
impl Sync for Wire
impl Unpin for Wire
impl UnsafeUnpin for Wire
impl UnwindSafe for Wire
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