MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / expires_in

Method expires_in

atomic-identity/src/delegation.rs:507–510  ·  view source on GitHub ↗

Create a delegation that expires after a duration.

(mut self, duration: Duration)

Source from the content-addressed store, hash-verified

505
506 /// Create a delegation that expires after a duration.
507 pub fn expires_in(mut self, duration: Duration) -> Self {
508 self.expires_at = Some(Utc::now() + duration);
509 self
510 }
511
512 /// Check if the delegation is currently valid.
513 pub fn is_valid(&self) -> bool {

Callers 1

test_delegation_expiryFunction · 0.80

Calls

no outgoing calls

Tested by 1

test_delegation_expiryFunction · 0.64