pub struct MigrationProgress {Show 14 fields
pub total_users: usize,
pub migrated_users: usize,
pub total_mailboxes: usize,
pub migrated_mailboxes: usize,
pub total_messages: usize,
pub migrated_messages: usize,
pub total_bytes: u64,
pub migrated_bytes: u64,
pub failed_messages: Vec<String>,
pub migrated_user_list: Vec<String>,
pub migrated_mailbox_map: HashMap<String, String>,
pub started_at: i64,
pub last_updated_at: i64,
pub completed_at: Option<i64>,
}Expand description
Migration progress tracker
Fields§
§total_users: usize§migrated_users: usize§total_mailboxes: usize§migrated_mailboxes: usize§total_messages: usize§migrated_messages: usize§total_bytes: u64§migrated_bytes: u64§failed_messages: Vec<String>§migrated_user_list: Vec<String>§migrated_mailbox_map: HashMap<String, String>§started_at: i64§last_updated_at: i64§completed_at: Option<i64>Implementations§
Source§impl MigrationProgress
impl MigrationProgress
pub fn new() -> Self
pub fn save_to_file(&self, path: &PathBuf) -> Result<()>
pub fn load_from_file(path: &PathBuf) -> Result<Self>
pub fn mark_user_migrated(&mut self, user: &str)
pub fn is_user_migrated(&self, user: &str) -> bool
pub fn mark_mailbox_migrated(&mut self, mailbox_key: String, mailbox_id: String)
pub fn is_mailbox_migrated(&self, mailbox_key: &str) -> bool
pub fn progress_percentage(&self) -> f64
pub fn eta_seconds(&self) -> Option<u64>
pub fn messages_per_second(&self) -> f64
Trait Implementations§
Source§impl Clone for MigrationProgress
impl Clone for MigrationProgress
Source§fn clone(&self) -> MigrationProgress
fn clone(&self) -> MigrationProgress
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 moreSource§impl Debug for MigrationProgress
impl Debug for MigrationProgress
Source§impl Default for MigrationProgress
impl Default for MigrationProgress
Source§impl<'de> Deserialize<'de> for MigrationProgress
impl<'de> Deserialize<'de> for MigrationProgress
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
Auto Trait Implementations§
impl Freeze for MigrationProgress
impl RefUnwindSafe for MigrationProgress
impl Send for MigrationProgress
impl Sync for MigrationProgress
impl Unpin for MigrationProgress
impl UnsafeUnpin for MigrationProgress
impl UnwindSafe for MigrationProgress
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreCreates a shared type from an unshared type.