#[non_exhaustive]pub struct Challenge {
pub name: String,
pub create_time: Option<Timestamp>,
pub expire_time: Option<Timestamp>,
pub used: bool,
pub tpm_nonce: String,
/* private fields */
}Expand description
A Challenge from the server used to guarantee freshness of attestations
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: StringOutput only. The resource name for this Challenge in the format
projects/*/locations/*/challenges/*
create_time: Option<Timestamp>Output only. The time at which this Challenge was created
expire_time: Option<Timestamp>Output only. The time at which this Challenge will no longer be usable. It is also the expiration time for any tokens generated from this Challenge.
used: boolOutput only. Indicates if this challenge has been used to generate a token.
tpm_nonce: StringOutput only. Identical to nonce, but as a string.
Implementations§
Source§impl Challenge
impl Challenge
pub fn new() -> 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 = Challenge::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 = Challenge::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = Challenge::new().set_or_clear_create_time(None::<Timestamp>);Sourcepub fn set_expire_time<T>(self, v: T) -> Self
pub fn set_expire_time<T>(self, v: T) -> Self
Sets the value of expire_time.
§Example
ⓘ
use wkt::Timestamp;
let x = Challenge::new().set_expire_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_expire_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_expire_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of expire_time.
§Example
ⓘ
use wkt::Timestamp;
let x = Challenge::new().set_or_clear_expire_time(Some(Timestamp::default()/* use setters */));
let x = Challenge::new().set_or_clear_expire_time(None::<Timestamp>);Trait Implementations§
impl StructuralPartialEq for Challenge
Auto Trait Implementations§
impl Freeze for Challenge
impl RefUnwindSafe for Challenge
impl Send for Challenge
impl Sync for Challenge
impl Unpin for Challenge
impl UnwindSafe for Challenge
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