Struct vss_client::types::ListKeyVersionsResponse
source · pub struct ListKeyVersionsResponse {
pub key_versions: Vec<KeyValue>,
pub next_page_token: Option<String>,
pub global_version: Option<i64>,
}Expand description
Server response for ListKeyVersions API.
Fields§
§key_versions: Vec<KeyValue>Fetched keys and versions.
Even though this API reuses the KeyValue struct, the value sub-field will not be set by the server.
next_page_token: Option<String>next_page_token is a pagination token, used to retrieve the next page of results.
Use this value to query for next-page of paginated ListKeyVersions operation, by specifying
this value as the page_token in the next request.
If next_page_token is empty (“”), then the “last page” of results has been processed and
there is no more data to be retrieved.
If next_page_token is not empty, it does not necessarily mean that there is more data in the
result set. The only way to know when you have reached the end of the result set is when
next_page_token is empty.
Caution: Clients must not assume a specific number of key_versions to be present in a page for paginated response.
global_version: Option<i64>global_version is a sequence-number/version of the whole store.
global_version is only returned in response for the first page of the ListKeyVersionsResponse
and is guaranteed to be read before reading any key-versions.
In case of refreshing the complete key-version view on the client-side, correct usage for
the returned global_version is as following:
- Read
global_versionfrom the first page of paginated response and save it as local variable. - Update all the
key_versionson client-side from all the pages of paginated response. - Update
global_versionon client_side from the local variable saved in step-1. This ensures that on client-side, all currentkey_versionswere stored atglobal_versionor later. This guarantee is helpful for ensuring the versioning correctness if using theglobal_versioninPutObjectAPI and can help avoid the race conditions related to it.
Implementations§
source§impl ListKeyVersionsResponse
impl ListKeyVersionsResponse
sourcepub fn next_page_token(&self) -> &str
pub fn next_page_token(&self) -> &str
Returns the value of next_page_token, or the default value if next_page_token is unset.
sourcepub fn global_version(&self) -> i64
pub fn global_version(&self) -> i64
Returns the value of global_version, or the default value if global_version is unset.
Trait Implementations§
source§impl Clone for ListKeyVersionsResponse
impl Clone for ListKeyVersionsResponse
source§fn clone(&self) -> ListKeyVersionsResponse
fn clone(&self) -> ListKeyVersionsResponse
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for ListKeyVersionsResponse
impl Debug for ListKeyVersionsResponse
source§impl Default for ListKeyVersionsResponse
impl Default for ListKeyVersionsResponse
source§impl Message for ListKeyVersionsResponse
impl Message for ListKeyVersionsResponse
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where B: BufMut, Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where Self: Sized,
source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where B: BufMut, Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where Self: Sized,
source§fn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode<B>(buf: B) -> Result<Self, DecodeError>where B: Buf, Self: Default,
source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where B: Buf, Self: Default,
source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where B: Buf, Self: Sized,
self. Read moresource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where B: Buf, Self: Sized,
self.source§impl PartialEq for ListKeyVersionsResponse
impl PartialEq for ListKeyVersionsResponse
source§fn eq(&self, other: &ListKeyVersionsResponse) -> bool
fn eq(&self, other: &ListKeyVersionsResponse) -> bool
self and other values to be equal, and is used
by ==.