#[non_exhaustive]pub struct ServiceTerms {
pub id: String,
pub version: String,
pub state: State,
pub accept_time: Option<Timestamp>,
pub decline_time: Option<Timestamp>,
/* private fields */
}Available on crate feature
project-service only.Expand description
Metadata about the terms of service.
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.id: StringThe unique identifier of this terms of service. Available terms:
GA_DATA_USE_TERMS: Terms for data use. When using this asid, the acceptable version to provide is2022-11-23.
version: StringThe version string of the terms of service. For acceptable values, see the comments for id above.
state: StateWhether the project has accepted/rejected the service terms or it is still pending.
accept_time: Option<Timestamp>The last time when the project agreed to the terms of service.
decline_time: Option<Timestamp>The last time when the project declined or revoked the agreement to terms of service.
Implementations§
Source§impl ServiceTerms
impl ServiceTerms
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_accept_time<T>(self, v: T) -> Self
pub fn set_accept_time<T>(self, v: T) -> Self
Sets the value of accept_time.
§Example
ⓘ
use wkt::Timestamp;
let x = ServiceTerms::new().set_accept_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_accept_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_accept_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of accept_time.
§Example
ⓘ
use wkt::Timestamp;
let x = ServiceTerms::new().set_or_clear_accept_time(Some(Timestamp::default()/* use setters */));
let x = ServiceTerms::new().set_or_clear_accept_time(None::<Timestamp>);Sourcepub fn set_decline_time<T>(self, v: T) -> Self
pub fn set_decline_time<T>(self, v: T) -> Self
Sets the value of decline_time.
§Example
ⓘ
use wkt::Timestamp;
let x = ServiceTerms::new().set_decline_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_decline_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_decline_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of decline_time.
§Example
ⓘ
use wkt::Timestamp;
let x = ServiceTerms::new().set_or_clear_decline_time(Some(Timestamp::default()/* use setters */));
let x = ServiceTerms::new().set_or_clear_decline_time(None::<Timestamp>);Trait Implementations§
Source§impl Clone for ServiceTerms
impl Clone for ServiceTerms
Source§fn clone(&self) -> ServiceTerms
fn clone(&self) -> ServiceTerms
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 ServiceTerms
impl Debug for ServiceTerms
Source§impl Default for ServiceTerms
impl Default for ServiceTerms
Source§fn default() -> ServiceTerms
fn default() -> ServiceTerms
Returns the “default value” for a type. Read more
Source§impl Message for ServiceTerms
impl Message for ServiceTerms
Source§impl PartialEq for ServiceTerms
impl PartialEq for ServiceTerms
impl StructuralPartialEq for ServiceTerms
Auto Trait Implementations§
impl Freeze for ServiceTerms
impl RefUnwindSafe for ServiceTerms
impl Send for ServiceTerms
impl Sync for ServiceTerms
impl Unpin for ServiceTerms
impl UnwindSafe for ServiceTerms
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