Trait screeps_api::TokenStorage
[−]
[src]
pub trait TokenStorage: Clone + 'static { fn take_token(&self) -> Option<Token>; fn return_token(&self, _: Token); }
A generic trait over some storage for auth tokens, possibly for use with sharing tokens between clients.
Required Methods
fn take_token(&self) -> Option<Token>
Takes a token from the token storage, if there are any tokens.
fn return_token(&self, _: Token)
Gives a new token back to the token storage.