pub struct RateLimitGuard<T> { /* private fields */ }Expand description
Rate limit guard — enforces per-client request rate limits.
Reads ClientIdentity from the Bus. Uses a token-bucket algorithm.
Implementations§
Trait Implementations§
Source§impl<T> Clone for RateLimitGuard<T>
impl<T> Clone for RateLimitGuard<T>
Source§impl<T> Debug for RateLimitGuard<T>
impl<T> Debug for RateLimitGuard<T>
Source§impl<T> Transition<T, T> for RateLimitGuard<T>
impl<T> Transition<T, T> for RateLimitGuard<T>
Source§type Resources = ()
type Resources = ()
The type of resources required by this transition.
This follows the “Hard-Wired Types” principle from the Master Plan.
Source§fn run<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
input: T,
_resources: &'life1 Self::Resources,
bus: &'life2 mut Bus,
) -> Pin<Box<dyn Future<Output = Outcome<T, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn run<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
input: T,
_resources: &'life1 Self::Resources,
bus: &'life2 mut Bus,
) -> Pin<Box<dyn Future<Output = Outcome<T, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Execute the transition. Read more
Source§fn description(&self) -> Option<String>
fn description(&self) -> Option<String>
Returns a detailed description of what this transition does.
Source§fn position(&self) -> Option<(f32, f32)>
fn position(&self) -> Option<(f32, f32)>
Returns the visual position of this transition in a schematic.
(x, y) coordinates.
Source§fn bus_access_policy(&self) -> Option<BusAccessPolicy>
fn bus_access_policy(&self) -> Option<BusAccessPolicy>
Optional transition-scoped Bus access policy (M143). Read more
Auto Trait Implementations§
impl<T> Freeze for RateLimitGuard<T>
impl<T> !RefUnwindSafe for RateLimitGuard<T>
impl<T> Send for RateLimitGuard<T>where
T: Send,
impl<T> Sync for RateLimitGuard<T>where
T: Sync,
impl<T> Unpin for RateLimitGuard<T>where
T: Unpin,
impl<T> UnsafeUnpin for RateLimitGuard<T>
impl<T> !UnwindSafe for RateLimitGuard<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more