#[non_exhaustive]pub struct MigrationProgressEvent {
pub step: MigrationStep,
pub step_details: Option<StepDetails>,
/* private fields */
}Expand description
An event signifying the start of a new step in a migration from Cloud Datastore to Cloud Firestore in Datastore mode.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.step: MigrationStepThe step that is starting.
An event with step set to START indicates that the migration
has been reverted back to the initial pre-migration state.
step_details: Option<StepDetails>Details about this step.
Implementations§
Source§impl MigrationProgressEvent
impl MigrationProgressEvent
pub fn new() -> Self
Sourcepub fn set_step<T: Into<MigrationStep>>(self, v: T) -> Self
pub fn set_step<T: Into<MigrationStep>>(self, v: T) -> Self
Sets the value of step.
§Example
use google_cloud_datastore_admin_v1::model::MigrationStep;
let x0 = MigrationProgressEvent::new().set_step(MigrationStep::Prepare);
let x1 = MigrationProgressEvent::new().set_step(MigrationStep::Start);
let x2 = MigrationProgressEvent::new().set_step(MigrationStep::ApplyWritesSynchronously);Sourcepub fn set_step_details<T: Into<Option<StepDetails>>>(self, v: T) -> Self
pub fn set_step_details<T: Into<Option<StepDetails>>>(self, v: T) -> Self
Sets the value of step_details.
Note that all the setters affecting step_details are mutually
exclusive.
§Example
use google_cloud_datastore_admin_v1::model::migration_progress_event::PrepareStepDetails;
let x = MigrationProgressEvent::new().set_step_details(Some(
google_cloud_datastore_admin_v1::model::migration_progress_event::StepDetails::PrepareStepDetails(PrepareStepDetails::default().into())));Sourcepub fn prepare_step_details(&self) -> Option<&Box<PrepareStepDetails>>
pub fn prepare_step_details(&self) -> Option<&Box<PrepareStepDetails>>
The value of step_details
if it holds a PrepareStepDetails, None if the field is not set or
holds a different branch.
Sourcepub fn set_prepare_step_details<T: Into<Box<PrepareStepDetails>>>(
self,
v: T,
) -> Self
pub fn set_prepare_step_details<T: Into<Box<PrepareStepDetails>>>( self, v: T, ) -> Self
Sets the value of step_details
to hold a PrepareStepDetails.
Note that all the setters affecting step_details are
mutually exclusive.
§Example
use google_cloud_datastore_admin_v1::model::migration_progress_event::PrepareStepDetails;
let x = MigrationProgressEvent::new().set_prepare_step_details(PrepareStepDetails::default()/* use setters */);
assert!(x.prepare_step_details().is_some());
assert!(x.redirect_writes_step_details().is_none());Sourcepub fn redirect_writes_step_details(
&self,
) -> Option<&Box<RedirectWritesStepDetails>>
pub fn redirect_writes_step_details( &self, ) -> Option<&Box<RedirectWritesStepDetails>>
The value of step_details
if it holds a RedirectWritesStepDetails, None if the field is not set or
holds a different branch.
Sourcepub fn set_redirect_writes_step_details<T: Into<Box<RedirectWritesStepDetails>>>(
self,
v: T,
) -> Self
pub fn set_redirect_writes_step_details<T: Into<Box<RedirectWritesStepDetails>>>( self, v: T, ) -> Self
Sets the value of step_details
to hold a RedirectWritesStepDetails.
Note that all the setters affecting step_details are
mutually exclusive.
§Example
use google_cloud_datastore_admin_v1::model::migration_progress_event::RedirectWritesStepDetails;
let x = MigrationProgressEvent::new().set_redirect_writes_step_details(RedirectWritesStepDetails::default()/* use setters */);
assert!(x.redirect_writes_step_details().is_some());
assert!(x.prepare_step_details().is_none());Trait Implementations§
Source§impl Clone for MigrationProgressEvent
impl Clone for MigrationProgressEvent
Source§fn clone(&self) -> MigrationProgressEvent
fn clone(&self) -> MigrationProgressEvent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more