pub struct ApiKeyDescr {
pub id: ApiKeyId,
pub name: String,
pub scopes: Vec<ApiPermission>,
}
Expand description
API key descriptor.
JSON schema
{
"description": "API key descriptor.",
"type": "object",
"required": [
"id",
"name",
"scopes"
],
"properties": {
"id": {
"$ref": "#/components/schemas/ApiKeyId"
},
"name": {
"type": "string"
},
"scopes": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ApiPermission"
}
}
}
}
Fields§
§id: ApiKeyId
§name: String
§scopes: Vec<ApiPermission>
Implementations§
Source§impl ApiKeyDescr
impl ApiKeyDescr
pub fn builder() -> ApiKeyDescr
Trait Implementations§
Source§impl Clone for ApiKeyDescr
impl Clone for ApiKeyDescr
Source§fn clone(&self) -> ApiKeyDescr
fn clone(&self) -> ApiKeyDescr
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 ApiKeyDescr
impl Debug for ApiKeyDescr
Source§impl<'de> Deserialize<'de> for ApiKeyDescr
impl<'de> Deserialize<'de> for ApiKeyDescr
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 From<&ApiKeyDescr> for ApiKeyDescr
impl From<&ApiKeyDescr> for ApiKeyDescr
Source§fn from(value: &ApiKeyDescr) -> Self
fn from(value: &ApiKeyDescr) -> Self
Converts to this type from the input type.
Source§impl From<ApiKeyDescr> for ApiKeyDescr
impl From<ApiKeyDescr> for ApiKeyDescr
Source§fn from(value: ApiKeyDescr) -> Self
fn from(value: ApiKeyDescr) -> Self
Converts to this type from the input type.
Source§impl Serialize for ApiKeyDescr
impl Serialize for ApiKeyDescr
Source§impl TryFrom<ApiKeyDescr> for ApiKeyDescr
impl TryFrom<ApiKeyDescr> for ApiKeyDescr
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: ApiKeyDescr) -> Result<Self, ConversionError>
fn try_from(value: ApiKeyDescr) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for ApiKeyDescr
impl RefUnwindSafe for ApiKeyDescr
impl Send for ApiKeyDescr
impl Sync for ApiKeyDescr
impl Unpin for ApiKeyDescr
impl UnwindSafe for ApiKeyDescr
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