diff --git a/lib/src/token_bucket_storage.dart b/lib/src/token_bucket_storage.dart index 4fca3c5..25886ab 100644 --- a/lib/src/token_bucket_storage.dart +++ b/lib/src/token_bucket_storage.dart @@ -6,8 +6,12 @@ import 'package:token_bucket_algorithm/token_bucket_algorithm.dart'; abstract class AsyncTokenBucketStorage { const AsyncTokenBucketStorage(); + /// Gets the current [TokenBucketState] stored by this storage. + /// + /// Returns [null] if no state is available. FutureOr get(); + /// Overwrites the currently stored [TokenBucketState] of this storage. FutureOr set(TokenBucketState state); }