Skip to content

Commit

Permalink
adds some documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
maeddin committed Jul 28, 2024
1 parent 9e97860 commit d0cba2f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/src/token_bucket_storage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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<TokenBucketState?> get();

/// Overwrites the currently stored [TokenBucketState] of this storage.
FutureOr<void> set(TokenBucketState state);
}

Expand Down

0 comments on commit d0cba2f

Please sign in to comment.