pub enum PrincipalParseError {
MissingSeparator(String),
UnknownIssuer(String),
EmptySubject(Issuer),
SubjectContainsSeparator(Issuer),
InvalidUuid(String),
InvalidNostrPubkey {
subject: String,
reason: &'static str,
},
InvalidApiKeyId(String),
InvalidOidcSubject {
subject: String,
reason: &'static str,
},
InvalidKeyPubkey {
subject: String,
reason: &'static str,
},
}Expand description
Why a string is not a valid Principal.
Intentionally not #[non_exhaustive]: plexus_core::identity::
PrincipalParseError re-exports this type (PLX-87), and PLX-75’s original
was exhaustive, so downstream match arms written against the plexus-core
path keep compiling. The Display strings are byte-identical to PLX-75’s
for the same reason.
Variants§
MissingSeparator(String)
No : separator at all.
UnknownIssuer(String)
The prefix is not a known issuer.
EmptySubject(Issuer)
The subject was empty.
SubjectContainsSeparator(Issuer)
The subject contained a second :, making the rendering ambiguous.
InvalidUuid(String)
idp: subject was not a canonical hyphenated UUID.
InvalidNostrPubkey
nostr: subject was not a 64-character lowercase hex pubkey.
InvalidApiKeyId(String)
apikey: subject contained non-printable or quoting characters.
InvalidOidcSubject
oidc: subject was not <provider>/<sub> (IDENTITY-13).
Added after the enum was pinned exhaustive for PLX-87’s re-export: a
downstream match with no wildcard arm needs this arm. No crate in
the workspace has one.
InvalidKeyPubkey
key: subject was not a 64-character lowercase hex Ed25519 public
key (IDENTITY-41). Added after the enum was pinned exhaustive, as
InvalidOidcSubject was.
Trait Implementations§
Source§impl Clone for PrincipalParseError
impl Clone for PrincipalParseError
Source§impl Debug for PrincipalParseError
impl Debug for PrincipalParseError
Source§impl Display for PrincipalParseError
impl Display for PrincipalParseError
impl Eq for PrincipalParseError
Source§impl Error for PrincipalParseError
impl Error for PrincipalParseError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()