#[non_exhaustive]pub struct SourceCode {
pub source_type: Option<SourceType>,
/* private fields */
}Expand description
Source type for the container.
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.source_type: Option<SourceType>The source type.
Implementations§
Source§impl SourceCode
impl SourceCode
pub fn new() -> Self
Sourcepub fn set_source_type<T: Into<Option<SourceType>>>(self, v: T) -> Self
pub fn set_source_type<T: Into<Option<SourceType>>>(self, v: T) -> Self
Sets the value of source_type.
Note that all the setters affecting source_type are mutually
exclusive.
§Example
ⓘ
use google_cloud_run_v2::model::source_code::CloudStorageSource;
let x = SourceCode::new().set_source_type(Some(
google_cloud_run_v2::model::source_code::SourceType::CloudStorageSource(CloudStorageSource::default().into())));Sourcepub fn cloud_storage_source(&self) -> Option<&Box<CloudStorageSource>>
pub fn cloud_storage_source(&self) -> Option<&Box<CloudStorageSource>>
The value of source_type
if it holds a CloudStorageSource, None if the field is not set or
holds a different branch.
Sourcepub fn set_cloud_storage_source<T: Into<Box<CloudStorageSource>>>(
self,
v: T,
) -> Self
pub fn set_cloud_storage_source<T: Into<Box<CloudStorageSource>>>( self, v: T, ) -> Self
Sets the value of source_type
to hold a CloudStorageSource.
Note that all the setters affecting source_type are
mutually exclusive.
§Example
ⓘ
use google_cloud_run_v2::model::source_code::CloudStorageSource;
let x = SourceCode::new().set_cloud_storage_source(CloudStorageSource::default()/* use setters */);
assert!(x.cloud_storage_source().is_some());Trait Implementations§
Source§impl Clone for SourceCode
impl Clone for SourceCode
Source§fn clone(&self) -> SourceCode
fn clone(&self) -> SourceCode
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 SourceCode
impl Debug for SourceCode
Source§impl Default for SourceCode
impl Default for SourceCode
Source§fn default() -> SourceCode
fn default() -> SourceCode
Returns the “default value” for a type. Read more
Source§impl PartialEq for SourceCode
impl PartialEq for SourceCode
impl StructuralPartialEq for SourceCode
Auto Trait Implementations§
impl Freeze for SourceCode
impl RefUnwindSafe for SourceCode
impl Send for SourceCode
impl Sync for SourceCode
impl Unpin for SourceCode
impl UnwindSafe for SourceCode
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