Create a delegation that expires after a duration.
(mut self, duration: Duration)
| 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 { |
no outgoing calls