#[non_exhaustive]pub struct Dependency {
pub dep: Option<Dep>,
/* private fields */
}Expand description
A dependency that the Cloud Build worker will fetch before executing user steps.
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.dep: Option<Dep>The type of dependency to fetch.
Implementations§
Source§impl Dependency
impl Dependency
pub fn new() -> Self
Sourcepub fn empty(&self) -> Option<&bool>
pub fn empty(&self) -> Option<&bool>
The value of dep
if it holds a Empty, None if the field is not set or
holds a different branch.
Sourcepub fn git_source(&self) -> Option<&Box<GitSourceDependency>>
pub fn git_source(&self) -> Option<&Box<GitSourceDependency>>
The value of dep
if it holds a GitSource, None if the field is not set or
holds a different branch.
Sourcepub fn set_git_source<T: Into<Box<GitSourceDependency>>>(self, v: T) -> Self
pub fn set_git_source<T: Into<Box<GitSourceDependency>>>(self, v: T) -> Self
Sets the value of dep
to hold a GitSource.
Note that all the setters affecting dep are
mutually exclusive.
§Example
ⓘ
use google_cloud_build_v1::model::dependency::GitSourceDependency;
let x = Dependency::new().set_git_source(GitSourceDependency::default()/* use setters */);
assert!(x.git_source().is_some());
assert!(x.empty().is_none());Trait Implementations§
Source§impl Clone for Dependency
impl Clone for Dependency
Source§fn clone(&self) -> Dependency
fn clone(&self) -> Dependency
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 Dependency
impl Debug for Dependency
Source§impl Default for Dependency
impl Default for Dependency
Source§fn default() -> Dependency
fn default() -> Dependency
Returns the “default value” for a type. Read more
Source§impl PartialEq for Dependency
impl PartialEq for Dependency
impl StructuralPartialEq for Dependency
Auto Trait Implementations§
impl Freeze for Dependency
impl RefUnwindSafe for Dependency
impl Send for Dependency
impl Sync for Dependency
impl Unpin for Dependency
impl UnsafeUnpin for Dependency
impl UnwindSafe for Dependency
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