pub struct MemoryUsageArg {
pub memory_usage: MemoryUsage,
}Expand description
Shared CLI arguments for commands that specify a memory usage.
Accepts a plain number, a number with a suffix, a percentage, or the
special value auto. If the value ends with b or B it is interpreted
as a number of bytes; otherwise, it is interpreted as a number of
elements. The available SI and NIST multipliers are k, M, G, T, P, ki,
Mi, Gi, Ti, and Pi. A trailing % interprets the value as a percentage of
the available memory. The value auto uses a non-linear formula that
behaves like 50% of RAM on small machines but grows sub-linearly on large
ones, capped at 1 TiB (256 MiB on 32-bit platforms); see
MemoryUsage::default for details. The default is auto.
Fields§
§memory_usage: MemoryUsageThe memory usage for batches (a number of elements with an optional SI/NIST suffix; append “b”/“B” for bytes, “%” for a percentage of available memory, or “auto” for a non-linear default).
Trait Implementations§
Source§impl Args for MemoryUsageArg
impl Args for MemoryUsageArg
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl Debug for MemoryUsageArg
impl Debug for MemoryUsageArg
Source§impl FromArgMatches for MemoryUsageArg
impl FromArgMatches for MemoryUsageArg
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Auto Trait Implementations§
impl Freeze for MemoryUsageArg
impl RefUnwindSafe for MemoryUsageArg
impl Send for MemoryUsageArg
impl Sync for MemoryUsageArg
impl Unpin for MemoryUsageArg
impl UnsafeUnpin for MemoryUsageArg
impl UnwindSafe for MemoryUsageArg
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> EitherFullOrEpsCopy<T> for Twhere
T: ?Sized,
impl<T> FullCopyConsistent<T> for Twhere
T: ?Sized,
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> ⓘ
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> ⓘ
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