pub struct ApiKeyList {
pub data: Vec<ApiKey>,
pub first_id: Option<String>,
pub last_id: Option<String>,
pub has_more: bool,
}Expand description
Response from the List API Keys API.
Fields§
§data: Vec<ApiKey>List of available API keys
first_id: Option<String>First ID in the data list (for pagination)
last_id: Option<String>Last ID in the data list (for pagination)
has_more: boolIndicates if there are more results in the requested page direction
Implementations§
Source§impl ApiKeyList
impl ApiKeyList
Sourcepub fn builder() -> ApiKeyListBuilder
pub fn builder() -> ApiKeyListBuilder
Creates a builder for listing API keys.
§Example
let credentials = Credentials::from_env();
let api_keys = ApiKeyList::builder()
.credentials(credentials)
.limit(10u32)
.create()
.await?;Sourcepub async fn create(request: ApiKeyListRequest) -> ApiResponseOrError<Self>
pub async fn create(request: ApiKeyListRequest) -> ApiResponseOrError<Self>
Lists available API keys with the given request parameters.
§Example
let credentials = Credentials::from_env();
let request = ApiKeyListRequest {
before_id: None,
after_id: None,
limit: Some(20),
status: None,
workspace_id: None,
created_by_user_id: None,
credentials: Some(credentials),
};
let api_keys = ApiKeyList::create(request).await?;Trait Implementations§
Source§impl Clone for ApiKeyList
impl Clone for ApiKeyList
Source§fn clone(&self) -> ApiKeyList
fn clone(&self) -> ApiKeyList
Returns a copy 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 ApiKeyList
impl Debug for ApiKeyList
Source§impl<'de> Deserialize<'de> for ApiKeyList
impl<'de> Deserialize<'de> for ApiKeyList
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ApiKeyList
impl PartialEq for ApiKeyList
impl Eq for ApiKeyList
impl StructuralPartialEq for ApiKeyList
Auto Trait Implementations§
impl Freeze for ApiKeyList
impl RefUnwindSafe for ApiKeyList
impl Send for ApiKeyList
impl Sync for ApiKeyList
impl Unpin for ApiKeyList
impl UnwindSafe for ApiKeyList
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.