pub struct TuiApp {
pub current_file_index: usize,
pub total_files: usize,
pub current_file_name: String,
pub exported_records: usize,
pub error_records: usize,
pub start_time: Option<Instant>,
pub is_finished: bool,
pub exporter_name: String,
/* private fields */
}Expand description
TUI 应用状态
Fields§
§current_file_index: usize当前处理文件索引
total_files: usize总文件数
current_file_name: String当前文件名
exported_records: usize已导出记录数
error_records: usize错误记录数
start_time: Option<Instant>任务开始时间
is_finished: bool是否完成
exporter_name: String导出器名称
Implementations§
Source§impl TuiApp
impl TuiApp
pub fn new(total_files: usize, exporter_name: String) -> Self
pub fn with_progress_tracker(self, tracker: ProgressTracker) -> Self
pub fn start(&mut self)
pub fn set_file(&mut self, index: usize, name: String)
pub fn add_records(&mut self, count: usize)
pub fn add_errors(&mut self, count: usize)
pub fn finish(&mut self)
pub fn progress_percent(&self) -> u16
pub fn elapsed_secs(&self) -> f64
pub fn throughput(&self) -> u64
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TuiApp
impl RefUnwindSafe for TuiApp
impl Send for TuiApp
impl Sync for TuiApp
impl Unpin for TuiApp
impl UnsafeUnpin for TuiApp
impl UnwindSafe for TuiApp
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,
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