Add get_as_mut to Limits

This commit is contained in:
bitfl0wer 2023-05-03 17:12:32 +02:00
parent 94fa84cabe
commit 5e399dba26
No known key found for this signature in database
GPG Key ID: 84BBB60DF895ABF2
1 changed files with 4 additions and 0 deletions

View File

@ -304,6 +304,10 @@ pub mod limits {
map map
} }
pub fn get_as_mut(&mut self) -> &mut Limits {
self
}
/// check_limits uses the API to get the current request limits of the instance. /// check_limits uses the API to get the current request limits of the instance.
/// It returns a `Limits` struct containing all the limits. /// It returns a `Limits` struct containing all the limits.
/// If the rate limit is disabled, then the limit is set to `u64::MAX`. /// If the rate limit is disabled, then the limit is set to `u64::MAX`.