#[non_exhaustive]pub struct GoModule {
pub name: String,
pub version: String,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
/* private fields */
}Expand description
GoModule represents a Go module.
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.name: StringThe resource name of a Go module.
version: StringThe version of the Go module. Must be a valid canonical version as defined in https://go.dev/ref/mod#glos-canonical-version.
create_time: Option<Timestamp>Output only. The time when the Go module is created.
update_time: Option<Timestamp>Output only. The time when the Go module is updated.
Implementations§
Source§impl GoModule
impl GoModule
pub fn new() -> Self
Sourcepub fn set_version<T: Into<String>>(self, v: T) -> Self
pub fn set_version<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_create_time<T>(self, v: T) -> Self
pub fn set_create_time<T>(self, v: T) -> Self
Sets the value of create_time.
§Example
ⓘ
use wkt::Timestamp;
let x = GoModule::new().set_create_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of create_time.
§Example
ⓘ
use wkt::Timestamp;
let x = GoModule::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = GoModule::new().set_or_clear_create_time(None::<Timestamp>);Sourcepub fn set_update_time<T>(self, v: T) -> Self
pub fn set_update_time<T>(self, v: T) -> Self
Sets the value of update_time.
§Example
ⓘ
use wkt::Timestamp;
let x = GoModule::new().set_update_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of update_time.
§Example
ⓘ
use wkt::Timestamp;
let x = GoModule::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
let x = GoModule::new().set_or_clear_update_time(None::<Timestamp>);Trait Implementations§
impl StructuralPartialEq for GoModule
Auto Trait Implementations§
impl Freeze for GoModule
impl RefUnwindSafe for GoModule
impl Send for GoModule
impl Sync for GoModule
impl Unpin for GoModule
impl UnsafeUnpin for GoModule
impl UnwindSafe for GoModule
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