#[non_exhaustive]pub struct FetchReadTokenResponse {
pub token: String,
pub expiration_time: Option<Timestamp>,
pub git_username: String,
/* private fields */
}Expand description
Message for responding to get read token.
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.token: StringThe token content.
expiration_time: Option<Timestamp>Expiration timestamp. Can be empty if unknown or non-expiring.
git_username: StringThe git_username to specify when making a git clone with the token. For example, for GitHub GitRepositoryLinks, this would be “x-access-token”
Implementations§
Source§impl FetchReadTokenResponse
impl FetchReadTokenResponse
pub fn new() -> Self
Sourcepub fn set_expiration_time<T>(self, v: T) -> Self
pub fn set_expiration_time<T>(self, v: T) -> Self
Sets the value of expiration_time.
Sourcepub fn set_or_clear_expiration_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_expiration_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of expiration_time.
Sourcepub fn set_git_username<T: Into<String>>(self, v: T) -> Self
pub fn set_git_username<T: Into<String>>(self, v: T) -> Self
Sets the value of git_username.
Trait Implementations§
Source§impl Clone for FetchReadTokenResponse
impl Clone for FetchReadTokenResponse
Source§fn clone(&self) -> FetchReadTokenResponse
fn clone(&self) -> FetchReadTokenResponse
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 FetchReadTokenResponse
impl Debug for FetchReadTokenResponse
Source§impl Default for FetchReadTokenResponse
impl Default for FetchReadTokenResponse
Source§fn default() -> FetchReadTokenResponse
fn default() -> FetchReadTokenResponse
Returns the “default value” for a type. Read more
Source§impl Message for FetchReadTokenResponse
impl Message for FetchReadTokenResponse
Source§impl PartialEq for FetchReadTokenResponse
impl PartialEq for FetchReadTokenResponse
impl StructuralPartialEq for FetchReadTokenResponse
Auto Trait Implementations§
impl Freeze for FetchReadTokenResponse
impl RefUnwindSafe for FetchReadTokenResponse
impl Send for FetchReadTokenResponse
impl Sync for FetchReadTokenResponse
impl Unpin for FetchReadTokenResponse
impl UnwindSafe for FetchReadTokenResponse
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