Add end of service notifications (#30982)
Release Notes: - N/A --------- Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com> Co-authored-by: Marshall Bowers <git@maxdeviant.com>
This commit is contained in:
parent
c747a57b7e
commit
315321bf8c
9 changed files with 327 additions and 201 deletions
|
@ -83,6 +83,13 @@ impl EditPredictionUsage {
|
|||
|
||||
Ok(Self { limit, amount })
|
||||
}
|
||||
|
||||
pub fn over_limit(&self) -> bool {
|
||||
match self.limit {
|
||||
UsageLimit::Limited(limit) => self.amount >= limit,
|
||||
UsageLimit::Unlimited => false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub trait EditPredictionProvider: 'static + Sized {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue