# Token Manager This crate provides useful abstractions for managing VK tokens. # Install ```toml [dependencies] vk-token-manager = "0.2.0" ``` # Using Checkout `/examples` directory for more examples. ```rust use token_manager::{TokenManager, ManageTokens}; use token_manager::{GroupId, SimpleToken, Token}; let mut manager = TokenManager::new(); // create token manager // put (boxed) token into. manager.add_token(GroupId::new(123), Box::new(SimpleToken::new(Token::new("my-token".into())))); let result = async { // get token by id let tok = manager.get_by_id(GroupId::new(123)).await; assert_eq!(tok, Some(&Token::new("my-token".into()))); }; ```