Add static token lifetime

This commit is contained in:
Curtis McEnroe 2015-12-21 22:13:44 -05:00
parent 38d81ed931
commit 397578840d
2 changed files with 11 additions and 0 deletions

View File

@ -29,3 +29,6 @@ pub trait Lifetime {
pub use self::bearer::Bearer;
mod bearer;
pub use self::statik::Static;
mod statik;

8
src/token/statik.rs Normal file
View File

@ -0,0 +1,8 @@
use super::Lifetime;
/// A static, non-expiring token.
pub struct Static;
impl Lifetime for Static {
fn expired(&self) -> bool { false }
}