#[non_exhaustive]pub struct GateOptions {
pub max_bytes: u64,
pub max_requests: usize,
}Expand description
The limits of one GatedStore.
Default is a query gate; maintenance is the
smaller gate for compaction, index builds and GC, so they never take the
permits queries need. The numbers are starting points, not measurements.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.max_bytes: u64Bytes that may be in flight at once, 1 to u32::MAX. A read larger
than this is admitted alone.
max_requests: usizeReads that may be in flight at once, at least 1.
Implementations§
Source§impl GateOptions
impl GateOptions
Sourcepub fn maintenance() -> Self
pub fn maintenance() -> Self
A maintenance gate: a quarter of the default bytes, the same requests.
Sourcepub fn max_requests(self, max_requests: usize) -> Self
pub fn max_requests(self, max_requests: usize) -> Self
Set max_requests.
Trait Implementations§
Source§impl Clone for GateOptions
impl Clone for GateOptions
impl Copy for GateOptions
Source§impl Debug for GateOptions
impl Debug for GateOptions
Source§impl Default for GateOptions
impl Default for GateOptions
Source§impl<'de> Deserialize<'de> for GateOptions
impl<'de> Deserialize<'de> for GateOptions
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for GateOptions
Source§impl PartialEq for GateOptions
impl PartialEq for GateOptions
Source§impl Serialize for GateOptions
impl Serialize for GateOptions
impl StructuralPartialEq for GateOptions
Auto Trait Implementations§
impl Forget for GateOptions
impl Freeze for GateOptions
impl Move for GateOptions
impl RefUnwindSafe for GateOptions
impl Send for GateOptions
impl Sync for GateOptions
impl Unpin for GateOptions
impl UnsafeUnpin for GateOptions
impl UnwindSafe for GateOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more