Skip to main content

AgentSetupConfigBuilder

Struct AgentSetupConfigBuilder 

Source
pub struct AgentSetupConfigBuilder { /* private fields */ }
Expand description

Builder for AgentSetupConfig.

Implementations§

Source§

impl AgentSetupConfigBuilder

Source

pub fn with_parent_did(self, did: impl Into<String>) -> Self

Sets the parent identity DID that delegates authority to this agent.

Args:

  • did: The DID of the owning identity.

Usage:

let config = AgentSetupConfig::builder("bot", path)
    .with_parent_did("did:keri:abc123")
    .build();
Source

pub fn with_capabilities(self, capabilities: Vec<Capability>) -> Self

Sets the capabilities granted to the agent.

Args:

  • capabilities: List of capabilities.

Usage:

let config = AgentSetupConfig::builder("bot", path)
    .with_capabilities(vec![Capability::sign_commit()])
    .build();
Source

pub fn with_expiry(self, secs: u64) -> Self

Sets the agent key expiration time in seconds.

Args:

  • secs: Seconds until the agent identity expires.

Usage:

let config = AgentSetupConfig::builder("bot", path)
    .with_expiry(86400) // 24 hours
    .build();
Source

pub fn dry_run(self, enabled: bool) -> Self

Enables dry-run mode (constructs state without persisting).

Usage:

let config = AgentSetupConfig::builder("bot", path)
    .dry_run(true)
    .build();
Source

pub fn build(self) -> AgentSetupConfig

Builds the final AgentSetupConfig.

Usage:

let config = AgentSetupConfig::builder("bot", path).build();

Trait Implementations§

Source§

impl Debug for AgentSetupConfigBuilder

Source§

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

Formats the value using the given formatter. Read more

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> 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, 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