pub struct AidBuilder { /* private fields */ }Expand description
Fluent builder for constructing AID documents.
Implementations§
Source§impl AidBuilder
impl AidBuilder
pub fn new() -> Self
Sourcepub fn id(self, id: impl Into<String>) -> Self
pub fn id(self, id: impl Into<String>) -> Self
Set the DID identifier (e.g., “did:idprova:example.com:my-agent”).
Sourcepub fn controller(self, controller: impl Into<String>) -> Self
pub fn controller(self, controller: impl Into<String>) -> Self
Set the controller DID (e.g., “did:idprova:example.com:alice”).
Sourcepub fn description(self, description: impl Into<String>) -> Self
pub fn description(self, description: impl Into<String>) -> Self
Set an optional description.
Sourcepub fn config_attestation(self, hash: impl Into<String>) -> Self
pub fn config_attestation(self, hash: impl Into<String>) -> Self
Set config attestation hash.
Sourcepub fn add_ed25519_key(self, keypair: &KeyPair) -> Self
pub fn add_ed25519_key(self, keypair: &KeyPair) -> Self
Add an Ed25519 verification method from a keypair.
Sourcepub fn trust_level(self, level: impl Into<String>) -> Self
pub fn trust_level(self, level: impl Into<String>) -> Self
Set the trust level.
Sourcepub fn build(self) -> Result<AidDocument>
pub fn build(self) -> Result<AidDocument>
Build the AID document.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AidBuilder
impl RefUnwindSafe for AidBuilder
impl Send for AidBuilder
impl Sync for AidBuilder
impl Unpin for AidBuilder
impl UnsafeUnpin for AidBuilder
impl UnwindSafe for AidBuilder
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
Mutably borrows from an owned value. Read more