#[non_exhaustive]pub enum ProviderId {
Claude,
Codex,
}Expand description
Which tool’s login this is.
non_exhaustive from the first day it exists, while there is still only one variant, so
every caller outside this crate is made to write a fallback arm before there is a second
variant to catch them out.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Implementations§
Source§impl ProviderId
impl ProviderId
Sourcepub const ALL: &'static [ProviderId]
pub const ALL: &'static [ProviderId]
Every provider pitboard knows, in the order a listing shows them.
Named rather than written out at each call site, because resolving a bare label has to look at all of them and a provider missing from one such list would simply never be found, with nothing failing to say so.
Sourcepub fn code(self) -> &'static str
pub fn code(self) -> &'static str
The one spelling used in a label prefix, in the state file, in a park’s name and in the audit log. Written once so those four cannot drift, and chosen from the command a person types rather than the company behind it, because the command is the thing that is stable.
Sourcepub fn service(self) -> &'static str
pub fn service(self) -> &'static str
The service behind the tool, as a person would name it.
Not the same as the tool: claude talks to Anthropic, codex to OpenAI. Messages
about a failed request name this, because “could not reach OpenAI” is something
somebody can act on and “could not reach the service” is not.
Sourcepub fn home_variable(self) -> &'static str
pub fn home_variable(self) -> &'static str
The environment variable that moves where the tool keeps its login.
Sourcepub fn login_command(self) -> &'static str
pub fn login_command(self) -> &'static str
What a person runs to sign in with the tool’s own command. Claude Code signs in from inside the program it starts; Codex has a subcommand for it.
pub fn parse(code: &str) -> Option<ProviderId>
Trait Implementations§
Source§impl Clone for ProviderId
impl Clone for ProviderId
impl Copy for ProviderId
Source§impl Debug for ProviderId
impl Debug for ProviderId
Source§impl<'de> Deserialize<'de> for ProviderId
impl<'de> Deserialize<'de> for ProviderId
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for ProviderId
impl Display for ProviderId
impl Eq for ProviderId
Source§impl Hash for ProviderId
impl Hash for ProviderId
Source§impl Ord for ProviderId
impl Ord for ProviderId
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for ProviderId
impl PartialEq for ProviderId
Source§impl PartialOrd for ProviderId
impl PartialOrd for ProviderId
Source§impl Serialize for ProviderId
impl Serialize for ProviderId
impl StructuralPartialEq for ProviderId
Auto Trait Implementations§
impl Freeze for ProviderId
impl RefUnwindSafe for ProviderId
impl Send for ProviderId
impl Sync for ProviderId
impl Unpin for ProviderId
impl UnsafeUnpin for ProviderId
impl UnwindSafe for ProviderId
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.