Struct grpcio::ResourceQuota
source · [−]pub struct ResourceQuota { /* private fields */ }
Expand description
ResourceQuota represents a bound on memory and thread usage by the gRPC. NOTE: The management of threads created in grpc-core don’t use ResourceQuota. TODO: Manage the poller threads created in grpc-rs with this ResourceQuota later.
Implementations
sourceimpl ResourceQuota
impl ResourceQuota
sourcepub fn new(name: Option<&str>) -> ResourceQuota
pub fn new(name: Option<&str>) -> ResourceQuota
Create a control block for resource quota. If a name is not declared for this control block, a name is automatically generated in grpc core.
sourcepub fn resize_memory(self, new_size: usize) -> ResourceQuota
pub fn resize_memory(self, new_size: usize) -> ResourceQuota
Resize this ResourceQuota to a new memory size.
Trait Implementations
sourceimpl Clone for ResourceQuota
impl Clone for ResourceQuota
Auto Trait Implementations
impl RefUnwindSafe for ResourceQuota
impl !Send for ResourceQuota
impl !Sync for ResourceQuota
impl Unpin for ResourceQuota
impl UnwindSafe for ResourceQuota
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more