#[non_exhaustive]pub struct SourceInfo {
pub operation: String,
pub source: Option<Source>,
/* private fields */
}Expand description
Information about the provenance of this database.
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.operation: StringThe associated long-running operation. This field may not be set after
the operation has completed. Format:
projects/{project}/databases/{database}/operations/{operation}.
source: Option<Source>The source from which this database is derived.
Implementations§
Source§impl SourceInfo
impl SourceInfo
pub fn new() -> Self
Sourcepub fn set_operation<T: Into<String>>(self, v: T) -> Self
pub fn set_operation<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_source<T: Into<Option<Source>>>(self, v: T) -> Self
pub fn set_source<T: Into<Option<Source>>>(self, v: T) -> Self
Sets the value of source.
Note that all the setters affecting source are mutually
exclusive.
§Example
ⓘ
use google_cloud_firestore_admin_v1::model::database::source_info::BackupSource;
let x = SourceInfo::new().set_source(Some(
google_cloud_firestore_admin_v1::model::database::source_info::Source::Backup(BackupSource::default().into())));Sourcepub fn backup(&self) -> Option<&Box<BackupSource>>
pub fn backup(&self) -> Option<&Box<BackupSource>>
The value of source
if it holds a Backup, None if the field is not set or
holds a different branch.
Sourcepub fn set_backup<T: Into<Box<BackupSource>>>(self, v: T) -> Self
pub fn set_backup<T: Into<Box<BackupSource>>>(self, v: T) -> Self
Sets the value of source
to hold a Backup.
Note that all the setters affecting source are
mutually exclusive.
§Example
ⓘ
use google_cloud_firestore_admin_v1::model::database::source_info::BackupSource;
let x = SourceInfo::new().set_backup(BackupSource::default()/* use setters */);
assert!(x.backup().is_some());Trait Implementations§
Source§impl Clone for SourceInfo
impl Clone for SourceInfo
Source§fn clone(&self) -> SourceInfo
fn clone(&self) -> SourceInfo
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 SourceInfo
impl Debug for SourceInfo
Source§impl Default for SourceInfo
impl Default for SourceInfo
Source§fn default() -> SourceInfo
fn default() -> SourceInfo
Returns the “default value” for a type. Read more
Source§impl PartialEq for SourceInfo
impl PartialEq for SourceInfo
impl StructuralPartialEq for SourceInfo
Auto Trait Implementations§
impl Freeze for SourceInfo
impl RefUnwindSafe for SourceInfo
impl Send for SourceInfo
impl Sync for SourceInfo
impl Unpin for SourceInfo
impl UnwindSafe for SourceInfo
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