Skip to main content

AccountKind

Enum AccountKind 

Source
pub enum AccountKind {
    Agent,
    Pipeline,
    Host,
    Service,
}
Expand description

One of the four account kinds this build recognizes.

Mirrors bot.did.registration’s actor union and didbot-pds::kind::AccountKind exactly, but is declared independently rather than reused from that crate — the same reasoning as Diff’s doc comment on not coupling this crate to one storage engine’s shape, applied to an account-kind enum instead of a diff type. A fifth kind added to the lexicon is a silent gap here until this enum is edited to match; nothing checks the two stay in step automatically.

Agents are the typical did.bot subject, not the only one: a policy or an evaluator that quietly assumes every subject is an agent is wrong about the other three, which is exactly what made AgentAttributes the wrong name for SubjectAttributes in an earlier draft of this type.

This type is deliberately closed — the four kinds this build knows how to reason about by name — and is not, by itself, what a subject’s kind is typed as. That is SubjectKind, below, because the union it names is open.

Variants§

§

Agent

A harness session with a model and a parent.

§

Pipeline

A CI identity bound to a workflow.

§

Host

A machine. No model, no harness, no parent.

§

Service

This software itself.

Implementations§

Source§

impl AccountKind

Source

pub fn as_str(self) -> &'static str

The kind as bot.did.registration spells it.

Trait Implementations§

Source§

impl Clone for AccountKind

Source§

fn clone(&self) -> AccountKind

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AccountKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Hash for AccountKind

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for AccountKind

Source§

fn eq(&self, other: &AccountKind) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for AccountKind

Source§

impl Eq for AccountKind

Source§

impl StructuralPartialEq for AccountKind

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.