#[non_exhaustive]pub struct MigrationError {
pub code: ErrorCode,
pub error_message: Option<LocalizedMessage>,
pub action_item: Option<LocalizedMessage>,
pub help_links: Vec<Link>,
pub error_time: Option<Timestamp>,
/* private fields */
}Expand description
Represents migration resource error information that can be used with google.rpc.Status message. MigrationError is used to present the user with error information in migration operations.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.code: ErrorCodeOutput only. The error code.
error_message: Option<LocalizedMessage>Output only. The localized error message.
action_item: Option<LocalizedMessage>Output only. Suggested action for solving the error.
help_links: Vec<Link>Output only. URL(s) pointing to additional information on handling the current error.
error_time: Option<Timestamp>Output only. The time the error occurred.
Implementations§
Source§impl MigrationError
impl MigrationError
Sourcepub fn set_code<T: Into<ErrorCode>>(self, v: T) -> Self
pub fn set_code<T: Into<ErrorCode>>(self, v: T) -> Self
Sets the value of code.
§Example
ⓘ
use google_cloud_vmmigration_v1::model::migration_error::ErrorCode;
let x0 = MigrationError::new().set_code(ErrorCode::UnknownError);
let x1 = MigrationError::new().set_code(ErrorCode::SourceValidationError);
let x2 = MigrationError::new().set_code(ErrorCode::SourceReplicationError);Sourcepub fn set_error_message<T>(self, v: T) -> Selfwhere
T: Into<LocalizedMessage>,
pub fn set_error_message<T>(self, v: T) -> Selfwhere
T: Into<LocalizedMessage>,
Sets the value of error_message.
§Example
ⓘ
use google_cloud_rpc::model::LocalizedMessage;
let x = MigrationError::new().set_error_message(LocalizedMessage::default()/* use setters */);Sourcepub fn set_or_clear_error_message<T>(self, v: Option<T>) -> Selfwhere
T: Into<LocalizedMessage>,
pub fn set_or_clear_error_message<T>(self, v: Option<T>) -> Selfwhere
T: Into<LocalizedMessage>,
Sets or clears the value of error_message.
§Example
ⓘ
use google_cloud_rpc::model::LocalizedMessage;
let x = MigrationError::new().set_or_clear_error_message(Some(LocalizedMessage::default()/* use setters */));
let x = MigrationError::new().set_or_clear_error_message(None::<LocalizedMessage>);Sourcepub fn set_action_item<T>(self, v: T) -> Selfwhere
T: Into<LocalizedMessage>,
pub fn set_action_item<T>(self, v: T) -> Selfwhere
T: Into<LocalizedMessage>,
Sets the value of action_item.
§Example
ⓘ
use google_cloud_rpc::model::LocalizedMessage;
let x = MigrationError::new().set_action_item(LocalizedMessage::default()/* use setters */);Sourcepub fn set_or_clear_action_item<T>(self, v: Option<T>) -> Selfwhere
T: Into<LocalizedMessage>,
pub fn set_or_clear_action_item<T>(self, v: Option<T>) -> Selfwhere
T: Into<LocalizedMessage>,
Sets or clears the value of action_item.
§Example
ⓘ
use google_cloud_rpc::model::LocalizedMessage;
let x = MigrationError::new().set_or_clear_action_item(Some(LocalizedMessage::default()/* use setters */));
let x = MigrationError::new().set_or_clear_action_item(None::<LocalizedMessage>);Sourcepub fn set_help_links<T, V>(self, v: T) -> Self
pub fn set_help_links<T, V>(self, v: T) -> Self
Sets the value of help_links.
§Example
ⓘ
use google_cloud_rpc::model::help::Link;
let x = MigrationError::new()
.set_help_links([
Link::default()/* use setters */,
Link::default()/* use (different) setters */,
]);Sourcepub fn set_error_time<T>(self, v: T) -> Self
pub fn set_error_time<T>(self, v: T) -> Self
Sets the value of error_time.
§Example
ⓘ
use wkt::Timestamp;
let x = MigrationError::new().set_error_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_error_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_error_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of error_time.
§Example
ⓘ
use wkt::Timestamp;
let x = MigrationError::new().set_or_clear_error_time(Some(Timestamp::default()/* use setters */));
let x = MigrationError::new().set_or_clear_error_time(None::<Timestamp>);Trait Implementations§
Source§impl Clone for MigrationError
impl Clone for MigrationError
Source§fn clone(&self) -> MigrationError
fn clone(&self) -> MigrationError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 MigrationError
impl Debug for MigrationError
Source§impl Default for MigrationError
impl Default for MigrationError
Source§fn default() -> MigrationError
fn default() -> MigrationError
Returns the “default value” for a type. Read more
Source§impl Message for MigrationError
impl Message for MigrationError
Source§impl PartialEq for MigrationError
impl PartialEq for MigrationError
Source§fn eq(&self, other: &MigrationError) -> bool
fn eq(&self, other: &MigrationError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for MigrationError
Auto Trait Implementations§
impl Freeze for MigrationError
impl RefUnwindSafe for MigrationError
impl Send for MigrationError
impl Sync for MigrationError
impl Unpin for MigrationError
impl UnsafeUnpin for MigrationError
impl UnwindSafe for MigrationError
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