pub enum SubjectKind<'a> {
Known(AccountKind),
Unknown(&'a str),
}Expand description
What kind of account a subject is, including a kind this build has never heard of.
bot.did.registration’s actor union is declared "closed": false: a
fifth kind can appear in a record this server did not write, admitted by
a future version of some deployment’s software or a fork’s. A type that
could only ever be one of AccountKind’s four variants would have
nowhere to put that value, forcing a choice between failing to parse the
record, or coercing an unrecognized kind into a known one — silently
making a claim about it nobody established. Unknown
exists so neither happens: the string is preserved and the subject still
routes, and see KindSet’s doc comment for
what an applicability declaration is and is not allowed to conclude from
one.
Variants§
Known(AccountKind)
One of the four kinds this build recognizes by name.
Unknown(&'a str)
A kind this build does not recognize, carrying the string the record named it with.
Implementations§
Trait Implementations§
Source§impl<'a> Clone for SubjectKind<'a>
impl<'a> Clone for SubjectKind<'a>
Source§fn clone(&self) -> SubjectKind<'a>
fn clone(&self) -> SubjectKind<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'a> Debug for SubjectKind<'a>
impl<'a> Debug for SubjectKind<'a>
Source§impl<'a> PartialEq for SubjectKind<'a>
impl<'a> PartialEq for SubjectKind<'a>
Source§fn eq(&self, other: &SubjectKind<'a>) -> bool
fn eq(&self, other: &SubjectKind<'a>) -> bool
self and other values to be equal, and is used by ==.impl<'a> Copy for SubjectKind<'a>
impl<'a> Eq for SubjectKind<'a>
impl<'a> StructuralPartialEq for SubjectKind<'a>
Auto Trait Implementations§
impl<'a> Freeze for SubjectKind<'a>
impl<'a> RefUnwindSafe for SubjectKind<'a>
impl<'a> Send for SubjectKind<'a>
impl<'a> Sync for SubjectKind<'a>
impl<'a> Unpin for SubjectKind<'a>
impl<'a> UnsafeUnpin for SubjectKind<'a>
impl<'a> UnwindSafe for SubjectKind<'a>
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.