#[non_exhaustive]pub struct Source {
pub source: Option<Source>,
/* private fields */
}Expand description
The location of the function source code.
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: Option<Source>Location of the source. At least one source needs to be provided for the deployment to succeed.
Implementations§
Source§impl Source
impl Source
pub fn new() -> 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
Sourcepub fn storage_source(&self) -> Option<&Box<StorageSource>>
pub fn storage_source(&self) -> Option<&Box<StorageSource>>
The value of source
if it holds a StorageSource, None if the field is not set or
holds a different branch.
Sourcepub fn set_storage_source<T: Into<Box<StorageSource>>>(self, v: T) -> Self
pub fn set_storage_source<T: Into<Box<StorageSource>>>(self, v: T) -> Self
Sets the value of source
to hold a StorageSource.
Note that all the setters affecting source are
mutually exclusive.
§Example
ⓘ
use google_cloud_functions_v2::model::StorageSource;
let x = Source::new().set_storage_source(StorageSource::default()/* use setters */);
assert!(x.storage_source().is_some());
assert!(x.repo_source().is_none());
assert!(x.git_uri().is_none());Sourcepub fn repo_source(&self) -> Option<&Box<RepoSource>>
pub fn repo_source(&self) -> Option<&Box<RepoSource>>
The value of source
if it holds a RepoSource, None if the field is not set or
holds a different branch.
Sourcepub fn set_repo_source<T: Into<Box<RepoSource>>>(self, v: T) -> Self
pub fn set_repo_source<T: Into<Box<RepoSource>>>(self, v: T) -> Self
Sets the value of source
to hold a RepoSource.
Note that all the setters affecting source are
mutually exclusive.
§Example
ⓘ
use google_cloud_functions_v2::model::RepoSource;
let x = Source::new().set_repo_source(RepoSource::default()/* use setters */);
assert!(x.repo_source().is_some());
assert!(x.storage_source().is_none());
assert!(x.git_uri().is_none());Sourcepub fn git_uri(&self) -> Option<&String>
pub fn git_uri(&self) -> Option<&String>
The value of source
if it holds a GitUri, None if the field is not set or
holds a different branch.
Sourcepub fn set_git_uri<T: Into<String>>(self, v: T) -> Self
pub fn set_git_uri<T: Into<String>>(self, v: T) -> Self
Trait Implementations§
impl StructuralPartialEq for Source
Auto Trait Implementations§
impl Freeze for Source
impl RefUnwindSafe for Source
impl Send for Source
impl Sync for Source
impl Unpin for Source
impl UnwindSafe for Source
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