pub struct Admission { /* private fields */ }Expand description
Local admission for clients whose traffic shares one caller-selected egress scope.
Clones share REST request capacity, provider cooldown, stream leases and connector-start pacing. The owner contains no credentials or account mutation state.
Implementations§
Source§impl Admission
impl Admission
Sourcepub fn with_exit_reserve(requests: u32) -> Result<Self>
pub fn with_exit_reserve(requests: u32) -> Result<Self>
Create an independent owner with an initial exit reserve.
§Errors
Returns Error::InvalidInput when requests is at least 120.
Sourcepub fn set_exit_reserve(&self, requests: u32) -> Result<()>
pub fn set_exit_reserve(&self, requests: u32) -> Result<()>
Replace the reserve without refunding spent capacity or shortening cooldown.
§Errors
Returns Error::InvalidInput for a reserve of at least 120 or a poisoned lock.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Admission
impl RefUnwindSafe for Admission
impl Send for Admission
impl Sync for Admission
impl Unpin for Admission
impl UnsafeUnpin for Admission
impl UnwindSafe for Admission
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