#[non_exhaustive]pub struct PersistentDirectory {
pub mount_path: String,
pub directory_type: Option<DirectoryType>,
/* private fields */
}Expand description
A directory to persist across workstation sessions. Updates to this field will not update existing workstations and will only take effect on new workstations.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.mount_path: StringOptional. Location of this directory in the running workstation.
directory_type: Option<DirectoryType>How a persistent directory should be implemented.
Implementations§
Source§impl PersistentDirectory
impl PersistentDirectory
Sourcepub fn set_mount_path<T: Into<String>>(self, v: T) -> Self
pub fn set_mount_path<T: Into<String>>(self, v: T) -> Self
Sets the value of mount_path.
§Example
let x = PersistentDirectory::new().set_mount_path("example");Sourcepub fn set_directory_type<T: Into<Option<DirectoryType>>>(self, v: T) -> Self
pub fn set_directory_type<T: Into<Option<DirectoryType>>>(self, v: T) -> Self
Sets the value of directory_type.
Note that all the setters affecting directory_type are mutually
exclusive.
§Example
use google_cloud_workstations_v1::model::workstation_config::persistent_directory::GceRegionalPersistentDisk;
let x = PersistentDirectory::new().set_directory_type(Some(
google_cloud_workstations_v1::model::workstation_config::persistent_directory::DirectoryType::GcePd(GceRegionalPersistentDisk::default().into())));Sourcepub fn gce_pd(&self) -> Option<&Box<GceRegionalPersistentDisk>>
pub fn gce_pd(&self) -> Option<&Box<GceRegionalPersistentDisk>>
The value of directory_type
if it holds a GcePd, None if the field is not set or
holds a different branch.
Sourcepub fn set_gce_pd<T: Into<Box<GceRegionalPersistentDisk>>>(self, v: T) -> Self
pub fn set_gce_pd<T: Into<Box<GceRegionalPersistentDisk>>>(self, v: T) -> Self
Sets the value of directory_type
to hold a GcePd.
Note that all the setters affecting directory_type are
mutually exclusive.
§Example
use google_cloud_workstations_v1::model::workstation_config::persistent_directory::GceRegionalPersistentDisk;
let x = PersistentDirectory::new().set_gce_pd(GceRegionalPersistentDisk::default()/* use setters */);
assert!(x.gce_pd().is_some());
assert!(x.gce_hd().is_none());Sourcepub fn gce_hd(&self) -> Option<&Box<GceHyperdiskBalancedHighAvailability>>
pub fn gce_hd(&self) -> Option<&Box<GceHyperdiskBalancedHighAvailability>>
The value of directory_type
if it holds a GceHd, None if the field is not set or
holds a different branch.
Sourcepub fn set_gce_hd<T: Into<Box<GceHyperdiskBalancedHighAvailability>>>(
self,
v: T,
) -> Self
pub fn set_gce_hd<T: Into<Box<GceHyperdiskBalancedHighAvailability>>>( self, v: T, ) -> Self
Sets the value of directory_type
to hold a GceHd.
Note that all the setters affecting directory_type are
mutually exclusive.
§Example
use google_cloud_workstations_v1::model::workstation_config::persistent_directory::GceHyperdiskBalancedHighAvailability;
let x = PersistentDirectory::new().set_gce_hd(GceHyperdiskBalancedHighAvailability::default()/* use setters */);
assert!(x.gce_hd().is_some());
assert!(x.gce_pd().is_none());Trait Implementations§
Source§impl Clone for PersistentDirectory
impl Clone for PersistentDirectory
Source§fn clone(&self) -> PersistentDirectory
fn clone(&self) -> PersistentDirectory
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PersistentDirectory
impl Debug for PersistentDirectory
Source§impl Default for PersistentDirectory
impl Default for PersistentDirectory
Source§fn default() -> PersistentDirectory
fn default() -> PersistentDirectory
Source§impl Message for PersistentDirectory
impl Message for PersistentDirectory
Source§impl PartialEq for PersistentDirectory
impl PartialEq for PersistentDirectory
impl StructuralPartialEq for PersistentDirectory
Auto Trait Implementations§
impl Freeze for PersistentDirectory
impl RefUnwindSafe for PersistentDirectory
impl Send for PersistentDirectory
impl Sync for PersistentDirectory
impl Unpin for PersistentDirectory
impl UnsafeUnpin for PersistentDirectory
impl UnwindSafe for PersistentDirectory
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request