pub struct CertBundle {
pub certs: Vec<DelegationCert>,
pub issued_at: u64,
}Expand description
A batch of delegation certs issued in a single atomic call.
All certs in a bundle share the same delegator and timestamp but may have different delegates, scopes, and TTLs. Issuing in a bundle is semantically equivalent to issuing each cert individually; the bundle is purely a transport convenience that lets callers issue a full sub-tree of delegations in one round-trip to the gateway.
§Example
ⓘ
use a1::cert::CertBundle;
let bundle = CertBundle::issue(&human, now, vec![
CertBuilder::new(agent_a.verifying_key(), scope_a, now, now + 3600),
CertBuilder::new(agent_b.verifying_key(), scope_b, now, now + 1800),
]);
assert_eq!(bundle.len(), 2);Fields§
§certs: Vec<DelegationCert>§issued_at: u64Implementations§
Source§impl CertBundle
impl CertBundle
Trait Implementations§
Source§impl Clone for CertBundle
impl Clone for CertBundle
Source§fn clone(&self) -> CertBundle
fn clone(&self) -> CertBundle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CertBundle
impl Debug for CertBundle
Source§impl<'de> Deserialize<'de> for CertBundle
impl<'de> Deserialize<'de> for CertBundle
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CertBundle
impl RefUnwindSafe for CertBundle
impl Send for CertBundle
impl Sync for CertBundle
impl Unpin for CertBundle
impl UnsafeUnpin for CertBundle
impl UnwindSafe for CertBundle
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