#[non_exhaustive]pub struct AllocationReservationSharingPolicy {
pub service_share_type: Option<ServiceShareType>,
/* private fields */
}Available on crate features
region-commitments or reservations only.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.Sharing config for all Google Cloud services.
Implementations§
Source§impl AllocationReservationSharingPolicy
impl AllocationReservationSharingPolicy
pub fn new() -> Self
Sets the value of service_share_type.
§Example
ⓘ
use google_cloud_compute_v1::model::allocation_reservation_sharing_policy::ServiceShareType;
let x0 = AllocationReservationSharingPolicy::new().set_service_share_type(ServiceShareType::DisallowAll);
let x1 = AllocationReservationSharingPolicy::new().set_service_share_type(ServiceShareType::Unspecified);Sets or clears the value of service_share_type.
§Example
ⓘ
use google_cloud_compute_v1::model::allocation_reservation_sharing_policy::ServiceShareType;
let x0 = AllocationReservationSharingPolicy::new().set_or_clear_service_share_type(Some(ServiceShareType::DisallowAll));
let x1 = AllocationReservationSharingPolicy::new().set_or_clear_service_share_type(Some(ServiceShareType::Unspecified));
let x_none = AllocationReservationSharingPolicy::new().set_or_clear_service_share_type(None::<ServiceShareType>);Trait Implementations§
Source§impl Clone for AllocationReservationSharingPolicy
impl Clone for AllocationReservationSharingPolicy
Source§fn clone(&self) -> AllocationReservationSharingPolicy
fn clone(&self) -> AllocationReservationSharingPolicy
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 Default for AllocationReservationSharingPolicy
impl Default for AllocationReservationSharingPolicy
Source§fn default() -> AllocationReservationSharingPolicy
fn default() -> AllocationReservationSharingPolicy
Returns the “default value” for a type. Read more
Source§impl PartialEq for AllocationReservationSharingPolicy
impl PartialEq for AllocationReservationSharingPolicy
Source§fn eq(&self, other: &AllocationReservationSharingPolicy) -> bool
fn eq(&self, other: &AllocationReservationSharingPolicy) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for AllocationReservationSharingPolicy
Auto Trait Implementations§
impl Freeze for AllocationReservationSharingPolicy
impl RefUnwindSafe for AllocationReservationSharingPolicy
impl Send for AllocationReservationSharingPolicy
impl Sync for AllocationReservationSharingPolicy
impl Unpin for AllocationReservationSharingPolicy
impl UnwindSafe for AllocationReservationSharingPolicy
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