#[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
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MigrationProgressEvent
impl Debug for MigrationProgressEvent
Source§impl Default for MigrationProgressEvent
impl Default for MigrationProgressEvent
Source§fn default() -> MigrationProgressEvent
fn default() -> MigrationProgressEvent
Source§impl Message for MigrationProgressEvent
impl Message for MigrationProgressEvent
Source§impl PartialEq for MigrationProgressEvent
impl PartialEq for MigrationProgressEvent
impl StructuralPartialEq for MigrationProgressEvent
Auto Trait Implementations§
impl Freeze for MigrationProgressEvent
impl RefUnwindSafe for MigrationProgressEvent
impl Send for MigrationProgressEvent
impl Sync for MigrationProgressEvent
impl Unpin for MigrationProgressEvent
impl UnsafeUnpin for MigrationProgressEvent
impl UnwindSafe for MigrationProgressEvent
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request