pub struct ScriptBatchResult {
pub total: usize,
pub success: usize,
pub failed: usize,
pub errors: Vec<String>,
}Expand description
批处理结果
Fields§
§total: usize总命令数
success: usize成功数
failed: usize失败数
errors: Vec<String>错误信息
Implementations§
Source§impl BatchResult
impl BatchResult
Sourcepub fn is_success(&self) -> bool
pub fn is_success(&self) -> bool
检查是否全部成功
Sourcepub fn success_rate(&self) -> f64
pub fn success_rate(&self) -> f64
获取成功率
Trait Implementations§
Source§impl Clone for BatchResult
impl Clone for BatchResult
Source§fn clone(&self) -> BatchResult
fn clone(&self) -> BatchResult
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for BatchResult
impl RefUnwindSafe for BatchResult
impl Send for BatchResult
impl Sync for BatchResult
impl Unpin for BatchResult
impl UnsafeUnpin for BatchResult
impl UnwindSafe for BatchResult
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