Skip to main content

TrustRootKind

Enum TrustRootKind 

Source
pub enum TrustRootKind {
    HubCheckpoint,
    Ship,
    HubOrg,
    CertIssuer,
    Revoker,
    AgentCert,
    SessionHost,
}
Expand description

What this trust root is allowed to verify. Encoded kebab-case in JSON because the rest of the codebase (CheckpointKind, etc.) does the same.

Adding a variant is a wire-format event: every JSON consumer that matches exhaustively on this enum must add the new arm in the same release. Phase 1 of the agent-invitations spec adds SessionHost for invitation issuer pinning; that addition is called out as a breaking change in the CHANGELOG for the same release.

Variants§

§

HubCheckpoint

Merkle Checkpoint produced by treeship merkle checkpoint. This is the ship-local journal checkpoint, distinct from the hub-org JournalCheckpoint kind below.

§

Ship

DEPRECATED, INERT (Batch 5 / trust-split). A single ship pin used to authorize THREE unrelated powers at once: promoting a local journal claim to a global single-use claim (hub checkpoints), issuing agent certificates, and revoking capabilities. Pinning a hub for dedup thus silently let it mint certs and kill capabilities. The powers are now split across HubOrg / CertIssuer / Revoker, and NO verifier accepts ship anymore. The variant is retained ONLY so an existing trust.json that still contains "kind":"ship" parses (rather than failing the whole file); such a pin is inert until re-pinned under the specific kind. treeship trust add --kind ship is rejected.

§

HubOrg

JournalCheckpoint of kind hub-org – signed by a remote Hub to promote a local journal claim to a global single-use claim. Split out of Ship so trusting a hub for single-use dedup does not also let it issue certificates or revoke capabilities.

§

CertIssuer

A ship key trusted to ISSUE agent certificates. Split out of Ship.

§

Revoker

A ship key trusted to REVOKE capabilities it issued. Split out of Ship.

§

AgentCert

AgentCertificate issued by a ship to one of its agents.

§

SessionHost

Phase 1 of agent invitations: the host’s signing key that mints InvitationStatement envelopes. Verifiers (and the treeship session join flow) require the invitation’s issuer pubkey to be present in the trust root store under this kind before honoring the invitation. Separate from the ship kinds so a machine can trust hub-org checkpoints without implicitly trusting that hub to host multi-agent rooms.

Implementations§

Source§

impl TrustRootKind

Source

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

Source

pub fn parse(s: &str) -> Option<Self>

Source

pub fn is_deprecated_ship(self) -> bool

True for the deprecated, inert ship kind that no verifier honors. Kept parseable only so legacy trust files still load.

Trait Implementations§

Source§

impl Clone for TrustRootKind

Source§

fn clone(&self) -> TrustRootKind

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 Copy for TrustRootKind

Source§

impl Debug for TrustRootKind

Source§

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

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

impl<'de> Deserialize<'de> for TrustRootKind

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for TrustRootKind

Source§

impl Hash for TrustRootKind

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 TrustRootKind

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl Serialize for TrustRootKind

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for TrustRootKind

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
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

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

Source§

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

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

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

Source§

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> Same for T

Source§

type Output = T

Should always be Self
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V