pub fn duration(mut self, val: Duration) -> Self {
        // TODO this should account for the server time instead (via sender's offset)
        self.inner_mut().rights.until_date = SystemTime::now()
            .duration_since(UNIX_EPOCH)
            .expect("system time is before epoch")
            .as_secs() as i32
            + val.as_secs() as i32;

        self
    }
/// Apply the restriction for a given duration.
Apply the restriction for a given duration.
Apply the restriction for a given duration .
pub fn duration(mut self, val: Duration) -> Self {
        // TODO this should account for the server time instead (via sender's offset)
        self.inner_mut().rights.until_date = SystemTime::now()
            .duration_since(UNIX_EPOCH)
            .expect("system time is before epoch")
            .as_secs() as i32
            + val.as_secs() as i32;
        self
    }
pub fn duration ( mut self , val : Duration ) -> Self { // TODO this should account for the server time instead (via sender's offset) self . inner_mut ( ) . rights . until_date = SystemTime :: now ( ) . duration_since ( UNIX_EPOCH ) . expect ( " " ) . as_secs ( ) as i32 + val . as_secs ( ) as i32 ; self }
Apply the restriction for a given duration.
Apply the restriction for a given duration .
mut self
val
Duration
mut self
val
Duration