#[non_exhaustive]pub struct PythonRepository {
pub upstream: Option<Upstream>,
/* private fields */
}Expand description
Configuration for a Python remote repository.
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.upstream: Option<Upstream>Address of the remote repository.
Implementations§
Source§impl PythonRepository
impl PythonRepository
pub fn new() -> Self
Sourcepub fn set_upstream<T: Into<Option<Upstream>>>(self, v: T) -> Self
pub fn set_upstream<T: Into<Option<Upstream>>>(self, v: T) -> Self
Sets the value of upstream.
Note that all the setters affecting upstream are mutually
exclusive.
§Example
ⓘ
use google_cloud_artifactregistry_v1::model::remote_repository_config::python_repository::PublicRepository;
let x0 = PythonRepository::new().set_upstream(Some(
google_cloud_artifactregistry_v1::model::remote_repository_config::python_repository::Upstream::PublicRepository(PublicRepository::Pypi)));Sourcepub fn public_repository(&self) -> Option<&PublicRepository>
pub fn public_repository(&self) -> Option<&PublicRepository>
The value of upstream
if it holds a PublicRepository, None if the field is not set or
holds a different branch.
Sourcepub fn set_public_repository<T: Into<PublicRepository>>(self, v: T) -> Self
pub fn set_public_repository<T: Into<PublicRepository>>(self, v: T) -> Self
Sets the value of upstream
to hold a PublicRepository.
Note that all the setters affecting upstream are
mutually exclusive.
§Example
ⓘ
use google_cloud_artifactregistry_v1::model::remote_repository_config::python_repository::PublicRepository;
let x0 = PythonRepository::new().set_public_repository(PublicRepository::Pypi);
assert!(x0.public_repository().is_some());
assert!(x0.custom_repository().is_none());Sourcepub fn custom_repository(&self) -> Option<&Box<CustomRepository>>
pub fn custom_repository(&self) -> Option<&Box<CustomRepository>>
The value of upstream
if it holds a CustomRepository, None if the field is not set or
holds a different branch.
Sourcepub fn set_custom_repository<T: Into<Box<CustomRepository>>>(self, v: T) -> Self
pub fn set_custom_repository<T: Into<Box<CustomRepository>>>(self, v: T) -> Self
Sets the value of upstream
to hold a CustomRepository.
Note that all the setters affecting upstream are
mutually exclusive.
§Example
ⓘ
use google_cloud_artifactregistry_v1::model::remote_repository_config::python_repository::CustomRepository;
let x = PythonRepository::new().set_custom_repository(CustomRepository::default()/* use setters */);
assert!(x.custom_repository().is_some());
assert!(x.public_repository().is_none());Trait Implementations§
Source§impl Clone for PythonRepository
impl Clone for PythonRepository
Source§fn clone(&self) -> PythonRepository
fn clone(&self) -> PythonRepository
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 PythonRepository
impl Debug for PythonRepository
Source§impl Default for PythonRepository
impl Default for PythonRepository
Source§fn default() -> PythonRepository
fn default() -> PythonRepository
Returns the “default value” for a type. Read more
Source§impl Message for PythonRepository
impl Message for PythonRepository
Source§impl PartialEq for PythonRepository
impl PartialEq for PythonRepository
impl StructuralPartialEq for PythonRepository
Auto Trait Implementations§
impl Freeze for PythonRepository
impl RefUnwindSafe for PythonRepository
impl Send for PythonRepository
impl Sync for PythonRepository
impl Unpin for PythonRepository
impl UnsafeUnpin for PythonRepository
impl UnwindSafe for PythonRepository
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