Struct ArgApp

Source
pub struct ArgApp {
Show 15 fields pub nap: f64, pub join_gap: f64, pub round_req: usize, pub round_req_min: usize, pub round_req_max: usize, pub buf_task: usize, pub spawn_task_max: usize, pub round_task: usize, pub round_task_min: usize, pub round_res: usize, pub round_errs: usize, pub round_entity: usize, pub skip: bool, pub arg_affix: Option<ArgAffix>, pub data_dir: String, /* private fields */
}
Expand description

Arguments that control the App at runtime, including using history or not,
Task Affix Request Response entities consuming and generating There shall be an introduction to every member(maybe coming soon).

Fields§

§nap: f64

time tap added to created Tasks or Affixs

§join_gap: f64

gap to forcefully join the spawned task

§round_req: usize

number that once for a concurrent future poll

§round_req_min: usize

cache request minimal length

§round_req_max: usize

cache request maximal length

§buf_task: usize

buffer length for the created task.

§spawn_task_max: usize

maximal spawned task that cached

§round_task: usize

construct req from task one time

§round_task_min: usize

minimal task(affix) consumed per round

§round_res: usize

consume response once upon a time

§round_errs: usize

consume errs once upon a time

§round_entity: usize

consume Entity once upon a time

§skip: bool

use files in directory data/ or not, set true as default

§arg_affix: Option<ArgAffix>

control the affix workflow

§data_dir: String

directory that store history file

Implementations§

Source§

impl ArgApp

Source

pub fn new() -> Self

create an instance of ArgApp

Source

pub fn affix_on(&self) -> bool

use Affixor or not

Source

pub fn parse_config(&mut self, _path: Option<&str>, fail_safe: bool)

parse the dyer.cfg file and update the ArgApp not fail safe for the first time call in ArgApp::new fail safe after that

Trait Implementations§

Source§

impl Debug for ArgApp

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl !Freeze for ArgApp

§

impl RefUnwindSafe for ArgApp

§

impl Send for ArgApp

§

impl !Sync for ArgApp

§

impl Unpin for ArgApp

§

impl UnwindSafe for ArgApp

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more